You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by sh...@apache.org on 2012/05/15 22:41:27 UTC
ios commit: Fixes CB-766 - Update bin/debug shell script to point to
Homebrew ios-sim 1.4 download
Updated Branches:
refs/heads/master d3ac2aaa2 -> 1fbaaaf8f
Fixes CB-766 - Update bin/debug shell script to point to Homebrew ios-sim 1.4 download
Project: http://git-wip-us.apache.org/repos/asf/incubator-cordova-ios/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-cordova-ios/commit/1fbaaaf8
Tree: http://git-wip-us.apache.org/repos/asf/incubator-cordova-ios/tree/1fbaaaf8
Diff: http://git-wip-us.apache.org/repos/asf/incubator-cordova-ios/diff/1fbaaaf8
Branch: refs/heads/master
Commit: 1fbaaaf8f1b695b5ee88fc344df762837536e543
Parents: d3ac2aa
Author: Shazron Abdullah <sh...@apache.org>
Authored: Tue May 15 13:41:18 2012 -0700
Committer: Shazron Abdullah <sh...@apache.org>
Committed: Tue May 15 13:41:18 2012 -0700
----------------------------------------------------------------------
bin/templates/project/cordova/debug | 18 +++++++++++++-----
1 files changed, 13 insertions(+), 5 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-cordova-ios/blob/1fbaaaf8/bin/templates/project/cordova/debug
----------------------------------------------------------------------
diff --git a/bin/templates/project/cordova/debug b/bin/templates/project/cordova/debug
index 7cc6d98..40086e3 100755
--- a/bin/templates/project/cordova/debug
+++ b/bin/templates/project/cordova/debug
@@ -24,15 +24,24 @@
# compile and launch a Cordova/iOS project to the simulator
#
# USAGE
-# ./debug [path name]
+# ./debug [path name] [project name]
#
# EXAMPLE
-# ./debug ~/Desktop/radness Radness
+# ./debug ~/Desktop/MyProject MyProject
#
set -e
+function usage(){
+ echo "Usage: $0 [path to project] [name of project]"
+ exit 1
+}
+
+# check arguments
+[ -z "$1" ] && usage
+[ -z "$2" ] && usage
+
PROJECT_PATH=${1:-"."}
-PROJECT_NAME=${2:-"CordovaExample"}
+PROJECT_NAME=$2
PRJ=$PROJECT_NAME.xcodeproj
APP=build/Release-iphonesimulator/$PROJECT_NAME.app
SDK=`xcodebuild -showsdks | grep Sim | tail -1 | awk '{print $6}'`
@@ -41,13 +50,12 @@ cd $PROJECT_PATH
xcodebuild -project $PRJ -sdk $SDK clean build
-
# launch using ios-sim
if which ios-sim >/dev/null; then
ios-sim launch $APP --stderr console.log --stdout console.log &
else
- echo -e '\033[31mError: ios-sim was not found. Please download, build and install version > 1.3 from https://github.com/Fingertips/ios-sim into your path. \033[m'; exit 1;
+ echo -e '\033[31mError: ios-sim was not found. Please download, build and install version 1.4 or greater from https://github.com/phonegap/ios-sim into your path. Or "brew install ios-sim" using homebrew: http://mxcl.github.com/homebrew/\033[m'; exit 1;
fi