Fixed setup_env.sh
authorDavid A. Velasco <dvelasco@solidgear.es>
Tue, 26 May 2015 11:45:35 +0000 (13:45 +0200)
committerDavid A. Velasco <dvelasco@solidgear.es>
Tue, 26 May 2015 11:45:35 +0000 (13:45 +0200)
setup_env.bat
setup_env.sh

index 8911de2..ded68e1 100644 (file)
@@ -17,30 +17,22 @@ goto initDefault
 :initForAnt
 echo "Executing Ant setup..."
 ::If the directory exists the script has already been executed
-if not exist .\actionbarsherlock (
-
-    ::Gets the owncloud-android-library
-    call git submodule init
-    call git submodule update
-    
-    ::Clones the actionbarsherlock and checks-out the right release (4.2.0)
-    git clone "https://github.com/JakeWharton/ActionBarSherlock.git" "actionbarsherlock"
-    cd "actionbarsherlock"
-    git checkout "90939dc3925ffaaa0de269bbbe1b35e274968ea1"
-    cd ../
-
-    call android.bat update project -p libs/android-support-appcompat-v7-exploded-aar --target android-16
-    call android.bat update lib-project -p owncloud-android-library
-    call android.bat update project -p .
-    call android.bat update project -p oc_jb_workaround
-    call android.bat update test-project -p tests -m ..
-)
+
+::Gets the owncloud-android-library
+call git submodule init
+call git submodule update
+
+call android.bat update project -p libs/android-support-appcompat-v7-exploded-aar --target android-16
+call android.bat update lib-project -p owncloud-android-library
+call android.bat update project -p .
+call android.bat update project -p oc_jb_workaround
+call android.bat update test-project -p tests -m ..
+
 goto complete
 
 :initDefault
 call git submodule init
 call git submodule update
-call android.bat update project -p libs/android-support-appcompat-v7-exploded-aar --target android-16
 call android.bat update lib-project -p owncloud-android-library
 call android.bat update project -p .
 call android.bat update project -p oc_jb_workaround
index 8c9af07..840de69 100755 (executable)
@@ -1,16 +1,6 @@
 #!/bin/bash -e
 
 
-#Repository
-ActionBarSherlockRepo="https://github.com/JakeWharton/ActionBarSherlock.git"
-
-#Directory for actionbarsherlock
-DIRECTORY="actionbarsherlock"
-
-#Commit for version 4.2 of actionbar sherlock
-COMMIT="90939dc3925ffaaa0de269bbbe1b35e274968ea1"
-
-
 function initDefault {
     git submodule init
     git submodule update
@@ -21,27 +11,19 @@ function initDefault {
 }
 
 function initForAnt {
-    #If the directory exists the script has already been executed
-    if [ ! -d "$DIRECTORY" ]; then
-
-        #Gets the owncloud-android-library
-        git submodule init
-        git submodule update
-
-        #Clones the actionbarsherlock and checks-out the right release (4.2.0)
-        git clone $ActionBarSherlockRepo $DIRECTORY
-        cd $DIRECTORY
-        git checkout $COMMIT
-        cd ../
 
-        #As default it updates the ant scripts
-        android update project -p "$DIRECTORY"/library -n ActionBarSherlock --target android-19
-        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 ..
-    fi
+       #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 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