You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by ag...@apache.org on 2013/06/28 18:01:06 UTC
[46/50] [abbrv] android commit: Fixes to the update command so it
doesn't delete anything other than build artifacts
Fixes to the update command so it doesn't delete anything other than build artifacts
Project: http://git-wip-us.apache.org/repos/asf/cordova-android/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-android/commit/fbf7f1c3
Tree: http://git-wip-us.apache.org/repos/asf/cordova-android/tree/fbf7f1c3
Diff: http://git-wip-us.apache.org/repos/asf/cordova-android/diff/fbf7f1c3
Branch: refs/heads/2.9.x
Commit: fbf7f1c3f99c1793706edf6e61de50e51b7845f7
Parents: 68bc57a
Author: Joe Bowser <bo...@apache.org>
Authored: Thu Jun 27 12:57:44 2013 -0700
Committer: Joe Bowser <bo...@apache.org>
Committed: Thu Jun 27 12:59:49 2013 -0700
----------------------------------------------------------------------
bin/update | 23 ++++++-----------------
1 file changed, 6 insertions(+), 17 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cordova-android/blob/fbf7f1c3/bin/update
----------------------------------------------------------------------
diff --git a/bin/update b/bin/update
index 20440d4..8e7503d 100755
--- a/bin/update
+++ b/bin/update
@@ -45,10 +45,6 @@ fi
# cleanup after exit and/or on error
function on_exit {
- if [ -f "$BUILD_PATH"/framework/assets/www/cordova.js ]
- then
- rm "$BUILD_PATH"/framework/assets/www/cordova.js
- fi
if [ -f "$BUILD_PATH"/framework/cordova-$VERSION.jar ]
then
rm "$BUILD_PATH"/framework/cordova-$VERSION.jar
@@ -103,16 +99,6 @@ 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
@@ -128,14 +114,17 @@ else
fi
# creating cordova folder and copying run/build/log/launch scripts
-mkdir "$PROJECT_PATH"/cordova
-mkdir "$PROJECT_PATH"/cordova/lib
+if [ ! -e "$PROJECT_PATH/cordova" ]
+then
+ mkdir "$PROJECT_PATH"/cordova
+ mkdir "$PROJECT_PATH"/cordova/lib
+fi
cp "$BUILD_PATH"/bin/templates/cordova/appinfo.jar "$PROJECT_PATH"/cordova/appinfo.jar
cp "$BUILD_PATH"/bin/templates/cordova/build "$PROJECT_PATH"/cordova/build
cp "$BUILD_PATH"/bin/templates/cordova/clean "$PROJECT_PATH"/cordova/clean
cp "$BUILD_PATH"/bin/templates/cordova/log "$PROJECT_PATH"/cordova/log
cp "$BUILD_PATH"/bin/templates/cordova/run "$PROJECT_PATH"/cordova/run
-cp "$BUILD_PATH"/bin/templates/cordova/lib/cordova "$PROJECT_PATH"/cordova/lib/cordova
+cp "$BUILD_PATH"/bin/templates/cordova/lib/cordova.js "$PROJECT_PATH"/cordova/lib/cordova.js
cp "$BUILD_PATH"/bin/templates/cordova/lib/install-device "$PROJECT_PATH"/cordova/lib/install-device
cp "$BUILD_PATH"/bin/templates/cordova/lib/install-emulator "$PROJECT_PATH"/cordova/lib/install-emulator
cp "$BUILD_PATH"/bin/templates/cordova/lib/list-devices "$PROJECT_PATH"/cordova/lib/list-devices