Created
February 18, 2014 21:31
-
-
Save opatut/9080543 to your computer and use it in GitHub Desktop.
Android Löve2D debugging helper
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
GAME=$1 | |
DIR="/sdcard/love" | |
MIME="application/x-love-game" | |
INTENT="org.love2d.android/.GameActivity" | |
if [[ -z "$1" ]]; then | |
GAME="game.love" | |
echo "Creating game package at $GAME" | |
zip -r "$GAME" * --exclude "$GAME" .\* > /dev/null | |
fi | |
echo "Sending package" | |
adb shell mkdir -p $DIR | |
adb push $GAME $DIR/ 2> /dev/null | |
echo "Restarting application" | |
adb shell am start -S -n "$INTENT" -d "file://$DIR/$GAME" -t "$MIME" -a android.intent.action.VIEW > /dev/null |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment