X-Git-Url: http://git.linex4red.de/pub/Android/ownCloud.git/blobdiff_plain/0bedcb9128a96f71d3877d8e08230f31be0c3388..2c3d44f47e7b7bf50da1e34fa1ccc96d7da011d6:/setup_env.sh diff --git a/setup_env.sh b/setup_env.sh index ae421423..a38c32df 100755 --- a/setup_env.sh +++ b/setup_env.sh @@ -1,10 +1,57 @@ #!/bin/bash -e -git submodule init -git submodule update -android update project -p actionbarsherlock/library -n ActionBarSherlock -android update lib-project -p owncloud-android-library -android update project -p . -android update project -p oc_jb_workaround -cp third_party/android-support-library/android-support-v4.jar actionbarsherlock/library/libs/android-support-v4.jar -android update test-project -p tests -m .. + +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-16 + + #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