forked from owncloud/android
-
Notifications
You must be signed in to change notification settings - Fork 0
/
setup_env.sh
executable file
·59 lines (46 loc) · 1.46 KB
/
setup_env.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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
#!/bin/bash -e
function initDefault {
git submodule init
git submodule update
android update lib-project -p owncloud-android-library
android update project -p .
android update project -p oc_jb_workaround
android update test-project -p tests -m ..
}
function initForAnt {
#Gets the owncloud-android-library
git submodule init
git submodule update
#Prepare project android-support-appcompat-v7 ; JAR file is not enough, includes resources
android update lib-project -p libs/android-support-appcompat-v7-exploded-aar --target android-23
android update lib-project -p libs/android-support-design-exploded-aar --target android-23
android update lib-project -p libs/com-getbase-floatingactionbutton-1-10-1-exploded-aar --target android-22
#As default it updates the ant scripts
android update lib-project -p owncloud-android-library
android update project -p .
android update project -p oc_jb_workaround
android update test-project -p tests -m ..
}
#No args
if [ $# -lt 1 ]; then
echo "No args found"
echo "Usage : $0 [gradle | maven | ant]"
exit
fi
#checking args
case "$1" in
"ant")
echo "Creating Ant environment"
initForAnt
;;
"gradle") echo "Creating gradle environment"
initDefault
;;
"maven") echo "Creating maven environment"
initDefault
;;
*) echo "Argument not recognized"
echo "Usage : $0 [gradle | maven | ant]"
;;
esac
exit