Last active
December 19, 2015 13:28
-
-
Save zerho/5962039 to your computer and use it in GitHub Desktop.
The script i used to automate the building process of a suite of games
This file contains hidden or 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 | |
create ./export it.wink.$1 $1 | |
# copy new project into decompiled `www` folder | |
cp -R -p $1/* export/assets/www/ | |
# fix an issue with lib import | |
sed -i "s/<script src=\"phonegap.js\"><\/script>/<script src=\"cordova-2.6.0.js\"><\/script>/g" export/assets/www/index.html | |
# set the splash screen | |
mv export/assets/www/splash.png export/res/drawable/splash.png | |
# remove useless resources | |
\rm -R export/res/drawable-xhdpi | |
\rm -R export/res/drawable-hdpi | |
\rm -R export/res/drawable-mdpi | |
\rm -R export/res/drawable-ldpi | |
cd export | |
# build for debugging | |
./cordova/build | |
mv bin/$1-debug.apk ../ | |
cd .. | |
\rm -R $1 export | |
# signs the apk | |
java -jar SignApk/signapk.jar SignApk/certificate.pem SignApk/key.pk8 $1 . | |
# given that you have the SignApk tool folder |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment