cordova-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From agri...@apache.org
Subject git commit: createproject.sh: include ios by default when host=Darwin
Date Sat, 26 Jul 2014 02:03:24 GMT
Repository: cordova-app-harness
Updated Branches:
  refs/heads/master 3b3236a31 -> 5fea836ef


createproject.sh: include ios by default when host=Darwin


Project: http://git-wip-us.apache.org/repos/asf/cordova-app-harness/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-app-harness/commit/5fea836e
Tree: http://git-wip-us.apache.org/repos/asf/cordova-app-harness/tree/5fea836e
Diff: http://git-wip-us.apache.org/repos/asf/cordova-app-harness/diff/5fea836e

Branch: refs/heads/master
Commit: 5fea836efe26b445bf57e2d380f760436f63339a
Parents: 3b3236a
Author: Andrew Grieve <agrieve@chromium.org>
Authored: Fri Jul 25 22:02:46 2014 -0400
Committer: Andrew Grieve <agrieve@chromium.org>
Committed: Fri Jul 25 22:02:46 2014 -0400

----------------------------------------------------------------------
 createproject.sh | 11 ++++++-----
 1 file changed, 6 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-app-harness/blob/5fea836e/createproject.sh
----------------------------------------------------------------------
diff --git a/createproject.sh b/createproject.sh
index 6f996ad..2e29065 100755
--- a/createproject.sh
+++ b/createproject.sh
@@ -27,7 +27,11 @@ if [[ $# -eq 0 || "$1" = "--help" ]]; then
     exit 1
 fi
 
-PLATFORMS="${PLATFORMS-android}"
+if [[ "Darwin" = $(uname -s) ]]; then
+    PLATFORMS="${PLATFORMS-android ios}"
+else
+    PLATFORMS="${PLATFORMS-android}"
+fi
 APP_ID=${APP_ID-org.apache.appharness}
 APP_NAME=${APP_NAME-CordovaAppHarness}
 APP_VERSION=$(cd "$AH_PATH" && node -e "console.log(require('./package').version)")
@@ -101,10 +105,7 @@ perl -i -pe "s/{ID}/$APP_ID/g" config.xml || exit 1
 perl -i -pe "s/{NAME}/$APP_NAME/g" config.xml || exit 1
 perl -i -pe "s/{VERSION}/$APP_VERSION/g" config.xml || exit 1
 
-PLATFORM_ARGS="$PLATFORMS"
-if [[ -n "$ANDROID_PATH" ]]; then
-  PLATFORM_ARGS="${PLATFORMS/android/$AH_PATH/node_modules/cordova-android}"
-fi
+PLATFORM_ARGS="${PLATFORMS/android/$AH_PATH/node_modules/cordova-android}"
 
 set -x
 $CORDOVA platform add $PLATFORM_ARGS || exit 1


Mime
View raw message