Skip to content

Instantly share code, notes, and snippets.

@opatut
Created February 18, 2014 21:31
Show Gist options
  • Star 3 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save opatut/9080543 to your computer and use it in GitHub Desktop.
Save opatut/9080543 to your computer and use it in GitHub Desktop.
Android Löve2D debugging helper
#!/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