Last active
August 29, 2015 14:18
-
-
Save ligi/4bbfeddb28b36da3e8e9 to your computer and use it in GitHub Desktop.
ci spoon script
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 | |
set +e | |
download-android | |
echo y | android update sdk --no-ui --filter android-18 > /dev/null | |
echo y | android update sdk --no-ui --filter sys-img-armeabi-v7a-android-18 --all > /dev/null | |
echo no | android create avd --force -n test -t android-18 --abi armeabi-v7a --skin 1280x800 | |
emulator -avd test -no-skin -no-audio -no-window & | |
# Originally written by Ralf Kistner <ralf@embarkmobile.com>, but placed in the public domain | |
bootanim="" | |
failcounter=0 | |
until [[ "$bootanim" =~ "stopped" ]]; do | |
bootanim=`adb -e shell getprop init.svc.bootanim 2>&1` | |
echo "$bootanim" | |
if [[ "$bootanim" =~ "not found" ]]; then | |
let "failcounter += 1" | |
if [[ $failcounter -gt 42 ]]; then | |
echo "Failed to start emulator" | |
exit 1 | |
fi | |
fi | |
sleep 1 | |
done | |
echo "Emulator available" | |
adb shell input keyevent 82 & | |
./gradlew spoon |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment