Skip to content

Commit

Permalink
edit build.sh
Browse files Browse the repository at this point in the history
  • Loading branch information
YurinDoctrine committed Aug 21, 2023
1 parent 4d36795 commit 6fd5677
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions build.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
#!/usr/bin/bash -e

if [ "$1" == "--test" ]; then
echo "Launching..."
$ADB install -r bin/hello.unaligned.apk
$ADB shell am start -n com.example.app/.MainActivity
fi

command -v curl > /dev/null 2>&1 || { echo >&2 "I require curl but it's not installed. Install it. Aborting."; exit 1; }
command -v javac > /dev/null 2>&1 || { echo >&2 "I require openjdk but it's not installed. Install it. Aborting."; exit 1; }
command -v unzip > /dev/null 2>&1 || { echo >&2 "I require unzip but it's not installed. Install it. Aborting."; exit 1; }
Expand Down Expand Up @@ -100,10 +106,4 @@ $APKSIGNER sign --ks mykey.keystore bin/hello.unaligned.apk

echo "All done! Apk at bin. Use --test to run it on your device."

if [ "$1" == "--test" ]; then
echo "Launching..."
$ADB install -r bin/hello.unaligned.apk
$ADB shell am start -n com.example.app/.MainActivity
fi

exit

0 comments on commit 6fd5677

Please sign in to comment.