From ee38b2ef034c4e5873c21303130830758f81e0d3 Mon Sep 17 00:00:00 2001 From: Dave E Date: Sun, 24 Feb 2013 02:56:05 +0000 Subject: [PATCH] Use pushd/popd instead of subshell Improves the error message that happens when ant is not installed. --- bin/create | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/bin/create b/bin/create index ea214ac9..2eae82bd 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