Updated Branches:
  refs/heads/master 5ab66f572 -> e28f7935c

Tweak createproject.sh to accept the platform list from the command line


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/9144a157
Tree: http://git-wip-us.apache.org/repos/asf/cordova-app-harness/tree/9144a157
Diff: http://git-wip-us.apache.org/repos/asf/cordova-app-harness/diff/9144a157

Branch: refs/heads/master
Commit: 9144a1570dffca1cc25c9a8c90bdbaf94dcba648
Parents: 5ab66f5
Author: Andrew Grieve <[email protected]>
Authored: Thu Oct 24 14:50:39 2013 -0400
Committer: Andrew Grieve <[email protected]>
Committed: Thu Oct 24 14:50:39 2013 -0400

----------------------------------------------------------------------
 createproject.sh | 20 +++++++++++---------
 1 file changed, 11 insertions(+), 9 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-app-harness/blob/9144a157/createproject.sh
----------------------------------------------------------------------
diff --git a/createproject.sh b/createproject.sh
index 531e5c9..17bb5c1 100755
--- a/createproject.sh
+++ b/createproject.sh
@@ -1,12 +1,12 @@
 #!/bin/bash
 
 CORDOVA=${CORDOVA-cordova}
+PLATFORMS=${PLATFORMS-ios}
 
 set -x
-$CORDOVA create CordovaAppHarness org.apache.appharness CordovaAppHarness
+$CORDOVA create CordovaAppHarness org.apache.appharness CordovaAppHarness || 
exit 1
 cd CordovaAppHarness
 
-
 echo '
 var cordova = require("../../cordova-cli/cordova");
 
@@ -36,17 +36,21 @@ npm install grunt grunt-contrib-watch
 
 rm -r www
 ln -s ../www www
-$CORDOVA platform add ios
-../../cordova-ios/bin/update_cordova_subproject 
platforms/ios/CordovaAppHarness.xcodeproj
+
+$CORDOVA platform add $PLATFORMS || exit 1
+
+if [[ $PLATFORMS = *ios* ]]; then
+    ../../cordova-ios/bin/update_cordova_subproject 
platforms/ios/CordovaAppHarness.xcodeproj
+fi
 
 $CORDOVA plugin add ../UrlRemap
-$CORDOVA plugin add ../../../mobile_chrome_apps/zip
-$CORDOVA plugin add ../../../BarcodeScanner # 
https://github.com/wildabeast/BarcodeScanner.git
 $CORDOVA plugin add ../../cordova-plugin-file
 $CORDOVA plugin add ../../cordova-plugin-file-transfer
 $CORDOVA plugin add ../../cordova-labs/file-extras
+$CORDOVA plugin add https://github.com/wildabeast/BarcodeScanner.git # Optional
 $CORDOVA plugin add ../../cordova-plugin-device # Not used by harness, but 
used by mobile-spec.
-
+# Currently unused. Will want it for .cdvh .crx support.
+# $CORDOVA plugin add ../../../mobile_chrome_apps/zip
 
 exit 0
 
@@ -55,5 +59,3 @@ for l in ../cordova-plugin-* ; do
   $CORDOVA plugin add "$l"
 done
 
-
-

Reply via email to