Return-Path: X-Original-To: apmail-cordova-commits-archive@www.apache.org Delivered-To: apmail-cordova-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id BD20B10C58 for ; Mon, 11 Nov 2013 23:07:28 +0000 (UTC) Received: (qmail 22366 invoked by uid 500); 11 Nov 2013 23:07:27 -0000 Delivered-To: apmail-cordova-commits-archive@cordova.apache.org Received: (qmail 22344 invoked by uid 500); 11 Nov 2013 23:07:27 -0000 Mailing-List: contact commits-help@cordova.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@cordova.apache.org Delivered-To: mailing list commits@cordova.apache.org Received: (qmail 22315 invoked by uid 99); 11 Nov 2013 23:07:27 -0000 Received: from tyr.zones.apache.org (HELO tyr.zones.apache.org) (140.211.11.114) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 11 Nov 2013 23:07:27 +0000 Received: by tyr.zones.apache.org (Postfix, from userid 65534) id 2B6668A2B9F; Mon, 11 Nov 2013 23:07:27 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: shazron@apache.org To: commits@cordova.apache.org Message-Id: <20751048cad54d6986ab0286a11c10fd@git.apache.org> X-Mailer: ASF-Git Admin Mailer Subject: ios commit: CB-5229 - cordova/emulate important improvements (stderr, check ios-sim before build) Date: Mon, 11 Nov 2013 23:07:27 +0000 (UTC) Updated Branches: refs/heads/master 2d89e2355 -> a19c02f09 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/a19c02f0 Tree: http://git-wip-us.apache.org/repos/asf/cordova-ios/tree/a19c02f0 Diff: http://git-wip-us.apache.org/repos/asf/cordova-ios/diff/a19c02f0 Branch: refs/heads/master Commit: a19c02f094998589c0b2134f514461e902132c8f Parents: 2d89e23 Author: Shazron Abdullah Authored: Mon Nov 11 15:07:19 2013 -0800 Committer: Shazron Abdullah Committed: Mon Nov 11 15:07:19 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/a19c02f0/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