aboutsummaryrefslogtreecommitdiff
path: root/build.sh
blob: 5d531c523513ed00fc0fc5664f75e4bbfab072da (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
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