You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by sh...@apache.org on 2013/05/13 23:05:06 UTC

ios commit: [CB-2974] Add a ./cordova/lib/list-devices project-level helper script to iOS

Updated Branches:
  refs/heads/master f01dad2b0 -> aabfb1682


[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/master
Commit: aabfb1682f64affa55e28ccacfe963a2142dfc60
Parents: f01dad2
Author: Shazron Abdullah <sh...@apache.org>
Authored: Mon May 13 14:05:06 2013 -0700
Committer: Shazron Abdullah <sh...@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"}'