forked from SaferMobile/InTheClear
-
Notifications
You must be signed in to change notification settings - Fork 15
/
setup-ant
executable file
·35 lines (29 loc) · 1016 Bytes
/
setup-ant
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
28
29
30
31
32
33
34
35
#!/bin/sh
if ! which android > /dev/null; then
if [ -z $ANDROID_HOME ]; then
if [ -e ~/.android/bashrc ]; then
. ~/.android/bashrc
else
echo "'android' not found, ANDROID_HOME must be set!"
exit
fi
else
export PATH="${ANDROID_HOME}/tools:$PATH"
fi
fi
projectname=`sed -n 's,.*name="app_name">\(.*\)<.*,\1,p' res/values/strings.xml`
# fetch target from project.properties
eval `grep '^target=' project.properties`
echo "Setting up build for $projectname"
echo ""
for f in `find external/ -name android-support-v4.jar`; do
projectdir=`dirname $f`
echo "Updating android-support-v4.jar in $projectdir:"
cp libs/appcompat/libs/android-support-v4.jar $f
done
for f in `find * -name project.properties`; do
projectdir=`dirname $f`
echo "Updating ant setup in $projectdir:"
android update lib-project -p $projectdir -t $target
done
android update project -p . --subprojects --name "$projectname" --target $target