cordova-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From agri...@apache.org
Subject android commit: Use pushd/popd instead of subshell
Date Thu, 14 Mar 2013 16:32:36 GMT
Updated Branches:
  refs/heads/master 0f70e04e6 -> ee38b2ef0


Use pushd/popd instead of subshell

Improves the error message that happens when ant is not installed.


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

Branch: refs/heads/master
Commit: ee38b2ef034c4e5873c21303130830758f81e0d3
Parents: 0f70e04
Author: Dave E <dave.git.2012@coolhandmook.com>
Authored: Sun Feb 24 02:56:05 2013 +0000
Committer: Andrew Grieve <agrieve@chromium.org>
Committed: Thu Mar 14 12:31:56 2013 -0400

----------------------------------------------------------------------
 bin/create |   16 +++++++++-------
 1 files changed, 9 insertions(+), 7 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-android/blob/ee38b2ef/bin/create
----------------------------------------------------------------------
diff --git a/bin/create b/bin/create
index ea214ac..2eae82b 100755
--- a/bin/create
+++ b/bin/create
@@ -59,10 +59,10 @@ function on_exit {
 }
 
 function createAppInfoJar {
-    (cd "$BUILD_PATH"/bin/templates/cordova/ApplicationInfo &&
-     javac ApplicationInfo.java &&
-     jar -cfe ../appinfo.jar ApplicationInfo ApplicationInfo.class
-    )
+    pushd "$BUILD_PATH"/bin/templates/cordova/ApplicationInfo > /dev/null
+    javac ApplicationInfo.java
+    jar -cfe ../appinfo.jar ApplicationInfo ApplicationInfo.class
+    popd > /dev/null
 }
 
 function on_error {
@@ -108,7 +108,7 @@ fi
 # if this a distribution release no need to build a jar
 if [ ! -e "$BUILD_PATH"/cordova-$VERSION.jar ] && [ -d "$BUILD_PATH"/framework ]
 then
-# update the cordova-android framework for the desired target
+    # 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
@@ -121,8 +121,10 @@ then
         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 )
+    # compile cordova.js and cordova.jar
+    pushd "$BUILD_PATH"/framework > /dev/null
+    ant jar > /dev/null
+    popd > /dev/null
 fi
 
 # create new android project


Mime
View raw message