Updated Branches:
  refs/heads/3.0.0 af0d321d5 -> 4899f3522

[CB-2974] Add a ./cordova/lib/list-devices 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/aabfb168
Tree: http://git-wip-us.apache.org/repos/asf/cordova-ios/tree/aabfb168
Diff: http://git-wip-us.apache.org/repos/asf/cordova-ios/diff/aabfb168

Branch: refs/heads/3.0.0
Commit: aabfb1682f64affa55e28ccacfe963a2142dfc60
Parents: f01dad2
Author: Shazron Abdullah <shaz...@apache.org>
Authored: Mon May 13 14:05:06 2013 -0700
Committer: Shazron Abdullah <shaz...@apache.org>
Committed: Mon May 13 14:05:06 2013 -0700

----------------------------------------------------------------------
 bin/templates/project/cordova/lib/list-devices |   12 ++----------
 1 files changed, 2 insertions(+), 10 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/aabfb168/bin/templates/project/cordova/lib/list-devices
----------------------------------------------------------------------
diff --git a/bin/templates/project/cordova/lib/list-devices 
b/bin/templates/project/cordova/lib/list-devices
index f072230..80dd3b8 100755
--- a/bin/templates/project/cordova/lib/list-devices
+++ b/bin/templates/project/cordova/lib/list-devices
@@ -17,14 +17,6 @@
 # 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
-
-echo 'iOS: Not able to list devices through the command-line at this time.'
-exit 1
\ No newline at end of file
+system_profiler SPUSBDataType | sed -n -e '/iPad/,/Serial/p' | grep "Serial 
Number:" | awk -F ": " '{print $2 " iPad"}'
+system_profiler SPUSBDataType | sed -n -e '/iPhone/,/Serial/p' | grep "Serial 
Number:" | awk -F ": " '{print $2 " iPhone"}'

Reply via email to