Permalink
Browse files

- Run android binary to update project.

- Set exit on error.
- Check if android binary exists to warn of PEBKAC.
  • Loading branch information...
DanielO committed Feb 27, 2012
1 parent 07341a5 commit b9de69240bd65219d858953adf975853a3746e0d
Showing with 11 additions and 0 deletions.
  1. +11 −0 BUILD.txt
View
@@ -1,10 +1,21 @@
# To build Serval BatPhone the first time, run the following commands:
# (or just run ./BUILD.txt, since this file is a valid shell script).
+# Exit on error
+set -e
+
# Setup and clone the submodules used.
git submodule init
git submodule update
+if [ -z "`which android`" ]; then
+ echo "Unable to find android executable, have you setup your build environment correctly"
+ exit 1
+fi
+
+# Update android SDK directory in local.properties.
+android update project -t `android list targets | grep \"android-8\" | awk '{print $2}'` -p .
+
# Build everything.
# This calls ndk-build but you must have NDK_ROOT env var set to the root of
# the NDK directory.

0 comments on commit b9de692

Please sign in to comment.