Created
July 17, 2014 05:37
-
-
Save j796160836/8e6db63dbe9e33cdf93f to your computer and use it in GitHub Desktop.
Build All Android projects
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 | |
function StopIfFail(){ | |
# http://www.dotkam.com/2008/10/24/getting-return-code-from-ant-in-shell/ | |
if [ $? -ne 0 ];then | |
echo "BUILD ERROR: see message above." | |
exit 1; | |
else | |
sleep 1 | |
fi | |
} | |
mkdir -p dist | |
for i in */; do | |
cd $i | |
project_name=`echo $i | sed 's/\///'` | |
android update lib-project --path . | |
ant clean release | |
cp -f bin/$project_name-release.apk ../dist/$project_name.apk | |
StopIfFail | |
cd .. | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment