Skip to content

Instantly share code, notes, and snippets.

@j796160836
Created July 17, 2014 05:37
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save j796160836/8e6db63dbe9e33cdf93f to your computer and use it in GitHub Desktop.
Save j796160836/8e6db63dbe9e33cdf93f to your computer and use it in GitHub Desktop.
Build All Android projects
#!/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