Use pushd/popd instead of subshell

Improves the error message that happens when ant is not installed.
This commit is contained in:
Dave E 2013-02-24 02:56:05 +00:00 committed by Andrew Grieve
parent 0f70e04e6e
commit ee38b2ef03

View File

@ -59,10 +59,10 @@ function on_exit {
} }
function createAppInfoJar { function createAppInfoJar {
(cd "$BUILD_PATH"/bin/templates/cordova/ApplicationInfo && pushd "$BUILD_PATH"/bin/templates/cordova/ApplicationInfo > /dev/null
javac ApplicationInfo.java && javac ApplicationInfo.java
jar -cfe ../appinfo.jar ApplicationInfo ApplicationInfo.class jar -cfe ../appinfo.jar ApplicationInfo ApplicationInfo.class
) popd > /dev/null
} }
function on_error { function on_error {
@ -122,7 +122,9 @@ then
fi fi
# compile cordova.js and cordova.jar # compile cordova.js and cordova.jar
(cd "$BUILD_PATH"/framework && ant jar &> /dev/null ) pushd "$BUILD_PATH"/framework > /dev/null
ant jar > /dev/null
popd > /dev/null
fi fi
# create new android project # create new android project