forked from ChatSecure/ChatSecureAndroid
-
Notifications
You must be signed in to change notification settings - Fork 0
/
update-ant-build.sh
executable file
·32 lines (25 loc) · 1.1 KB
/
update-ant-build.sh
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
#!/bin/sh
set -e
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
# fetch target from project.properties
eval `grep '^target=' project.properties`
projectname=`sed -n 's,.*name="app_name">\(.*\)<.*,\1,p' res/values/strings.xml`
for lib in `sed -n 's,^android\.library\.reference\.[0-9][0-9]*=\(.*\),\1,p' project.properties`; do
android update lib-project --path $lib --target $target
done
android update project --path . --name $projectname --target $target --subprojects
cp libs/android-support-v4.jar external/SlidingMenu/library/libs/android-support-v4.jar
cp libs/android-support-v4.jar external/cacheword/cachewordlib/libs/android-support-v4.jar
cp libs/android-support-v4.jar external/ViewPagerIndicator/library/libs/android-support-v4.jar
cp libs/android-support-v4.jar external/AndroidEmojiInput/library/libs/android-support-v4.jar