You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by fi...@apache.org on 2012/06/29 00:05:30 UTC
ios commit: [CB-982] add usage help to create script,
remove unnecessary parameters from debug project-level script
Updated Branches:
refs/heads/master 9daddd1ee -> 06c3591ad
[CB-982] add usage help to create script, remove unnecessary parameters from debug project-level script
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/06c3591a
Tree: http://git-wip-us.apache.org/repos/asf/incubator-cordova-ios/tree/06c3591a
Diff: http://git-wip-us.apache.org/repos/asf/incubator-cordova-ios/diff/06c3591a
Branch: refs/heads/master
Commit: 06c3591add01dd4bc631e64fff832062515a3cdc
Parents: 9daddd1
Author: Fil Maj <ma...@gmail.com>
Authored: Thu Jun 28 15:07:00 2012 -0700
Committer: Fil Maj <ma...@gmail.com>
Committed: Thu Jun 28 15:07:00 2012 -0700
----------------------------------------------------------------------
bin/create | 6 ++++++
bin/templates/project/cordova/debug | 26 ++++++++------------------
2 files changed, 14 insertions(+), 18 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-cordova-ios/blob/06c3591a/bin/create
----------------------------------------------------------------------
diff --git a/bin/create b/bin/create
index 7575e3b..09813e3 100755
--- a/bin/create
+++ b/bin/create
@@ -30,6 +30,12 @@
#
set -e
+if [ -n "$1" ] && [ "$1" == "-h" ]
+then
+ echo 'usage: create path package name'
+ exit 0
+fi
+
BINDIR=$( cd "$( dirname "$0" )" && pwd )
PROJECT_PATH=${1:-"./example"}
PACKAGE=${2:-"org.apache.cordova.example"}
http://git-wip-us.apache.org/repos/asf/incubator-cordova-ios/blob/06c3591a/bin/templates/project/cordova/debug
----------------------------------------------------------------------
diff --git a/bin/templates/project/cordova/debug b/bin/templates/project/cordova/debug
index 40086e3..97ae741 100755
--- a/bin/templates/project/cordova/debug
+++ b/bin/templates/project/cordova/debug
@@ -1,5 +1,4 @@
-
-#! /bin/bash
+#!/bin/bash
#
# Licensed to the Apache Software Foundation (ASF) under one
@@ -22,27 +21,18 @@
#
# compile and launch a Cordova/iOS project to the simulator
-#
-# USAGE
-# ./debug [path name] [project name]
-#
-# EXAMPLE
-# ./debug ~/Desktop/MyProject MyProject
#
+
set -e
-function usage(){
- echo "Usage: $0 [path to project] [name of project]"
- exit 1
-}
+CORDOVA_PATH=$( cd "$( dirname "$0" )" && pwd )
+
+PROJECT_PATH=$CORDOVA_PATH/..
-# check arguments
-[ -z "$1" ] && usage
-[ -z "$2" ] && usage
+for file in *.xcodeproj; do
+ PRJ=$file
+done;
-PROJECT_PATH=${1:-"."}
-PROJECT_NAME=$2
-PRJ=$PROJECT_NAME.xcodeproj
APP=build/Release-iphonesimulator/$PROJECT_NAME.app
SDK=`xcodebuild -showsdks | grep Sim | tail -1 | awk '{print $6}'`