apache/cordova-android — pull request #20 by coolhandmook (2013-02-24 03:10:41+00:00)
Title: Problem with create script if ant not installed

If you don't have ant installed when you run the create script, you get a misleading message telling you something like this:

```
An unexpected error occurred: [ ! -e "$BUILD_PATH"/framework/libs/commons-codec-1.7.jar ] exited with 1
Deleting project...
```

The reason appears to be that the error trap set up for `on_error` doesn't play nicely with running the ant command in a subshell. The subshell appears to be used to preserve the current working directory. If `pushd` and `popd` are used instead, then a more helpful error is given, something like:

```
./create: line 119: ant: command not found
An unexpected error occurred: ant jar > /dev/null exited with 127
Deleting project...
```