aboutsummaryrefslogtreecommitdiff
path: root/build.sh
diff options
context:
space:
mode:
Diffstat (limited to 'build.sh')
-rwxr-xr-xbuild.sh27
1 files changed, 27 insertions, 0 deletions
diff --git a/build.sh b/build.sh
new file mode 100755
index 0000000..5d531c5
--- /dev/null
+++ b/build.sh
@@ -0,0 +1,27 @@
+#!/bin/bash
+
+if [ -z "$ANDROID_HOME" ]; then
+ echo "Please export the ANDORID_HOME environment variable as following:"
+ echo "export ANDORID_HOME=<sdk-path>"
+ exit 1
+fi
+
+if ! `which ant >&/dev/null`; then
+ echo "Please install the ant command which will be used for building the jar file"
+ exit 1
+fi
+
+parent=$(cd $(dirname $0);pwd)
+proj_name=`basename $parent`
+
+${ANDROID_HOME}/tools/android create uitest-project -n $proj_name -t 1 -p $parent
+if [ $? -ne 0 ]; then
+ echo "Failed to create the uitest-project with the source under this directory"
+ exit 1
+fi
+ant build
+if [ $? -ne 0 ]; then
+ echo "Failed to build the directory"
+ exit 1
+fi
+