You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by st...@apache.org on 2013/06/11 02:15:37 UTC

[22/32] android commit: Forgot to update this so that it doesn't destroy someone's project, FAIL

Forgot to update this so that it doesn't destroy someone's project, FAIL


Project: http://git-wip-us.apache.org/repos/asf/cordova-android/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-android/commit/0dd4951b
Tree: http://git-wip-us.apache.org/repos/asf/cordova-android/tree/0dd4951b
Diff: http://git-wip-us.apache.org/repos/asf/cordova-android/diff/0dd4951b

Branch: refs/heads/3.0.0
Commit: 0dd4951be70b5216c96aab90f6e3eba2710a61e6
Parents: 12d06bd
Author: Joe Bowser <bo...@apache.org>
Authored: Tue Jun 4 14:28:16 2013 -0700
Committer: Joe Bowser <bo...@apache.org>
Committed: Tue Jun 4 14:28:16 2013 -0700

----------------------------------------------------------------------
 bin/update | 12 ++++++++++--
 1 file changed, 10 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-android/blob/0dd4951b/bin/update
----------------------------------------------------------------------
diff --git a/bin/update b/bin/update
index 2e716a7..20440d4 100755
--- a/bin/update
+++ b/bin/update
@@ -64,8 +64,6 @@ function createAppInfoJar {
 
 function on_error {
     echo "An unexpected error occurred: $previous_command exited with $?"
-    echo "Deleting project..."
-    [ -d "$PROJECT_PATH" ] && rm -rf "$PROJECT_PATH"
     exit 1
 }
 
@@ -105,6 +103,16 @@ then
 # update the cordova-android framework for the desired target
     "$ANDROID_BIN" update project --target $TARGET --path "$BUILD_PATH"/framework &> /dev/null
 
+    if [ ! -e "$BUILD_PATH"/framework/libs/commons-codec-1.7.jar ]; then
+        # Use curl to get the jar (TODO: Support Apache Mirrors)
+        curl -OL http://archive.apache.org/dist/commons/codec/binaries/commons-codec-1.7-bin.zip &> /dev/null
+        unzip commons-codec-1.7-bin.zip &> /dev/null
+        mkdir -p "$BUILD_PATH"/framework/libs
+        cp commons-codec-1.7/commons-codec-1.7.jar "$BUILD_PATH"/framework/libs
+        # cleanup yo
+        rm commons-codec-1.7-bin.zip && rm -rf commons-codec-1.7
+    fi
+
 # compile cordova.js and cordova.jar
     (cd "$BUILD_PATH"/framework && ant jar &> /dev/null )
 fi