CB-1359 simplifying API_LEVEL command

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

Branch: refs/heads/master
Commit: 0bfc9935b2759f7816b23ad50e023b0e63ddc359
Parents: f71e664
Author: Anis Kadri <anis.ka...@gmail.com>
Authored: Fri Sep 28 17:41:12 2012 -0700
Committer: Anis Kadri <anis.ka...@gmail.com>
Committed: Fri Sep 28 17:41:12 2012 -0700

----------------------------------------------------------------------
 bin/create |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-cordova-android/blob/0bfc9935/bin/create
----------------------------------------------------------------------
diff --git a/bin/create b/bin/create
index 2f6c018..8f53524 100755
--- a/bin/create
+++ b/bin/create
@@ -93,7 +93,7 @@ 
ACTIVITY_PATH="$PROJECT_PATH"/src/$PACKAGE_AS_PATH/$ACTIVITY.java
 MANIFEST_PATH="$PROJECT_PATH"/AndroidManifest.xml
 
 TARGET=$($ANDROID_BIN list targets | grep id: | tail -1 | cut -f 2 -d ' ' )
-API_LEVEL=$($ANDROID_BIN list target | grep "API level:" | tail -n 1 | awk 
'{gsub("     API level:", "");print}' | cut -f 2 -d ' ')
+API_LEVEL=$($ANDROID_BIN list target | grep "API level:" | tail -n 1 | cut -f 
2 -d ':' | tr -d ' ')
 
 # if this a distribution release no need to build a jar
 if [ ! -e "$BUILD_PATH"/cordova-$VERSION.jar ] && [ -d "$BUILD_PATH"/framework 
]

Reply via email to