cordova-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From shaz...@apache.org
Subject ios commit: CB-5229 - cordova/emulate important improvements (stderr, check ios-sim before build)
Date Mon, 11 Nov 2013 23:07:46 GMT
Updated Branches:
  refs/heads/3.2.x 416f83ccd -> 079368d2e


CB-5229 - cordova/emulate important improvements (stderr, check ios-sim before build)


Project: http://git-wip-us.apache.org/repos/asf/cordova-ios/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-ios/commit/079368d2
Tree: http://git-wip-us.apache.org/repos/asf/cordova-ios/tree/079368d2
Diff: http://git-wip-us.apache.org/repos/asf/cordova-ios/diff/079368d2

Branch: refs/heads/3.2.x
Commit: 079368d2e4c210cafb3ac5dbc302cbb8178bfe1c
Parents: 416f83c
Author: Shazron Abdullah <shazron@apache.org>
Authored: Mon Nov 11 15:07:19 2013 -0800
Committer: Shazron Abdullah <shazron@apache.org>
Committed: Mon Nov 11 15:07:41 2013 -0800

----------------------------------------------------------------------
 bin/templates/scripts/cordova/emulate | 26 +++++++++++++-------------
 1 file changed, 13 insertions(+), 13 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/079368d2/bin/templates/scripts/cordova/emulate
----------------------------------------------------------------------
diff --git a/bin/templates/scripts/cordova/emulate b/bin/templates/scripts/cordova/emulate
index 7878c78..241cbb6 100755
--- a/bin/templates/scripts/cordova/emulate
+++ b/bin/templates/scripts/cordova/emulate
@@ -31,27 +31,27 @@ APP_PATH=${1:-$PROJECT_PATH/build/emulator/$(xcodebuild -project "$PROJECT_PATH/
 
 DEVICE_FAMILY=${2:-${DEVICE_FAMILY:-iphone}}
 
-if [ ! -d "$APP_PATH" ]; then
-	echo "Project '$APP_PATH' is not built. Building."
-    "$CORDOVA_PATH/build" || exit $?
-fi
-
-if [ ! -d "$APP_PATH" ]; then
-	echo "$APP_PATH not found to emulate."
-	exit 1
-fi
-
 IOS_SIM_MIN_VERSION="1.7"
 IOS_SIM_LOCATION=$(which ios-sim)
 if [ $? != 0 ]; then
-    echo -e "\033[31mError: ios-sim was not found. Please download, build and install version
$IOS_SIM_MIN_VERSION or greater from https://github.com/phonegap/ios-sim into your path. Or
'npm install -g ios-sim' using node.js: http://nodejs.org/\033[m"; exit 1;
-	exit 1
+    echo -e "\033[31mError: ios-sim was not found. Please download, build and install version
$IOS_SIM_MIN_VERSION or greater from https://github.com/phonegap/ios-sim into your path. Or
'npm install -g ios-sim' using node.js: http://nodejs.org/\033[m" 1>&2; 
+	exit 1;
 fi
 
 IOS_SIM_VERSION=$(ios-sim --version)
 
 if [[ "$IOS_SIM_VERSION" < "$IOS_SIM_MIN_VERSION" ]]; then
-	echo "Cordova needs ios-sim version $IOS_SIM_MIN_VERSION or greater, you have version $IOS_SIM_VERSION."
+	echo "Cordova needs ios-sim version $IOS_SIM_MIN_VERSION or greater, you have version $IOS_SIM_VERSION."
1>&2;
+	exit 1
+fi
+
+if [ ! -d "$APP_PATH" ]; then
+	echo "Project '$APP_PATH' is not built. Building."
+    "$CORDOVA_PATH/build" || exit $?
+fi
+
+if [ ! -d "$APP_PATH" ]; then
+	echo "$APP_PATH not found to emulate." 1>&2;
 	exit 1
 fi
 


Mime
View raw message