cordova-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From shaz...@apache.org
Subject [08/11] ios commit: [CB-2966] Add a ./cordova/lib/list-started-emulators as project-level helper script to iOS
Date Thu, 25 Apr 2013 13:43:01 GMT
[CB-2966] Add a ./cordova/lib/list-started-emulators as project-level helper script to iOS


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

Branch: refs/heads/master
Commit: 7e34b251edfa90718f192ac96b732bb74711b559
Parents: 6428b2a
Author: Shazron Abdullah <shazron@apache.org>
Authored: Thu Apr 25 06:16:45 2013 -0700
Committer: Shazron Abdullah <shazron@apache.org>
Committed: Thu Apr 25 06:36:55 2013 -0700

----------------------------------------------------------------------
 .../project/cordova/lib/list-started-emulators     |   36 +++++++++++++++
 1 files changed, 36 insertions(+), 0 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/7e34b251/bin/templates/project/cordova/lib/list-started-emulators
----------------------------------------------------------------------
diff --git a/bin/templates/project/cordova/lib/list-started-emulators b/bin/templates/project/cordova/lib/list-started-emulators
new file mode 100755
index 0000000..cfafe67
--- /dev/null
+++ b/bin/templates/project/cordova/lib/list-started-emulators
@@ -0,0 +1,36 @@
+#!/usr/bin/env bash 
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+# 
+# http://www.apache.org/licenses/LICENSE-2.0
+# 
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+#  KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+# Valid values for "--target" (case insensitive):
+#     "iPhone (Retina 3.5-inch)" (default)
+#     "iPhone (Retina 4-inch)"
+#     "iPhone"
+#     "iPad"
+#     "iPad (Retina)"
+
+set -e
+
+SIM_RUNNING=$(ps aux | grep -i "[i]Phone Simulator" | wc -l)
+if [ $SIM_RUNNING == 0 ]; then
+    echo "No emulators are running."
+    exit 1
+fi
+
+SIM_ID=`defaults read com.apple.iphonesimulator "SimulateDevice"`
+echo \"$SIM_ID\"


Mime
View raw message