From 46cd13e54b8a26c3623bcb900d66e5032b80a390 Mon Sep 17 00:00:00 2001 From: Roland Walker Date: Fri, 14 Feb 2014 12:05:35 -0500 Subject: [PATCH] devscript: support binary/json plist transparently minor doc tweak --- developer/bin/list_id_in_kext | 3 ++- developer/bin/list_ids_in_app | 3 ++- developer/bin/list_ids_in_pkg | 7 ++++--- 3 files changed, 8 insertions(+), 5 deletions(-) diff --git a/developer/bin/list_id_in_kext b/developer/bin/list_id_in_kext index 8050a05f18..b2103b729a 100755 --- a/developer/bin/list_id_in_kext +++ b/developer/bin/list_id_in_kext @@ -23,7 +23,8 @@ kextdir='' bundle_id_source_1 () { /usr/bin/find "$kextdir" -name Info.plist -print0 | \ - /usr/bin/xargs -0 /usr/bin/perl -0777 -ne \ + /usr/bin/xargs -0 /usr/bin/plutil -convert xml1 -o - -- | \ + /usr/bin/perl -0777 -ne \ 'while (m{\s*CFBundleIdentifier\s*\s*([^<]+?)}sg) { print "$1\n" }' } diff --git a/developer/bin/list_ids_in_app b/developer/bin/list_ids_in_app index bc4af90524..0b9fa90d5d 100755 --- a/developer/bin/list_ids_in_app +++ b/developer/bin/list_ids_in_app @@ -24,7 +24,8 @@ scriptdir="$(dirname "$0")" bundle_id_source_1 () { /usr/bin/find "$appdir" -name Info.plist -print0 | \ - /usr/bin/xargs -0 /usr/bin/perl -0777 -ne \ + /usr/bin/xargs -0 /usr/bin/plutil -convert xml1 -o - -- | \ + /usr/bin/perl -0777 -ne \ 'while (m{\s*CFBundleIdentifier\s*\s*([^<]+?)}sg) { print "$1\n" }' } diff --git a/developer/bin/list_ids_in_pkg b/developer/bin/list_ids_in_pkg index cdefaff879..e451a0f3aa 100755 --- a/developer/bin/list_ids_in_pkg +++ b/developer/bin/list_ids_in_pkg @@ -29,7 +29,8 @@ bundle_id_source_1 () { bundle_id_source_2 () { /usr/bin/find "$pkgdir" -name Info.plist -print0 | \ - /usr/bin/xargs -0 /usr/bin/perl -0777 -ne \ + /usr/bin/xargs -0 /usr/bin/plutil -convert xml1 -o - -- | \ + /usr/bin/perl -0777 -ne \ 'while (m{\s*CFBundleIdentifier\s*\s*([^<]+?)}sg) { print "$1\n" }' } @@ -92,8 +93,8 @@ The output of this script should be overly inclusive -- not every candidate package id in the output will be needed at uninstall time. -Package IDs designated by Apple or the Sparkle framework will -be omitted. +Package IDs designated by Apple or common development frameworks +will be excluded from the output. If a package id is already installed, it will be followed by a plus symbol '(+)' in the output. This can be verified via