From 6dad86849dca08ada6bb770bd84c4df68785acd6 Mon Sep 17 00:00:00 2001 From: Markus Reiter Date: Tue, 5 Jul 2016 08:00:20 +0200 Subject: [PATCH] use `/usr/libexec/PlistBuddy` in `list_id`-scripts (#22592) --- developer/bin/list_id_in_kext | 4 +--- developer/bin/list_ids_in_app | 4 +--- developer/bin/list_ids_in_pkg | 4 +--- 3 files changed, 3 insertions(+), 9 deletions(-) diff --git a/developer/bin/list_id_in_kext b/developer/bin/list_id_in_kext index ad35fd1ab3..b1ee95a771 100755 --- a/developer/bin/list_id_in_kext +++ b/developer/bin/list_id_in_kext @@ -26,9 +26,7 @@ xargs="$(/usr/bin/which gxargs || printf '/usr/bin/xargs')" bundle_id_source_1 () { /usr/bin/find "$kextdir" -name Info.plist -print0 | \ - "$xargs" -0 /usr/bin/plutil -convert xml1 -o - -- 2> /dev/null | \ - /usr/bin/perl -0777 -ne \ - 'while (m{\s*CFBundleIdentifier\s*\s*([^<]+?)}sg) { print "$1\n" }' + "$xargs" -0 -I {} /usr/libexec/PlistBuddy {} -c 'Print :CFBundleIdentifier' } merge_sources () { diff --git a/developer/bin/list_ids_in_app b/developer/bin/list_ids_in_app index b04f9bcea6..62b2e654f1 100755 --- a/developer/bin/list_ids_in_app +++ b/developer/bin/list_ids_in_app @@ -27,9 +27,7 @@ xargs="$(/usr/bin/which gxargs || printf '/usr/bin/xargs')" bundle_id_source_1 () { /usr/bin/find "$appdir" -name Info.plist -print0 | \ - "$xargs" -0 /usr/bin/plutil -convert xml1 -o - -- 2> /dev/null | \ - /usr/bin/perl -0777 -ne \ - 'while (m{\s*CFBundleIdentifier\s*\s*([^<]+?)}sg) { print "$1\n" }' + "$xargs" -0 -I {} /usr/libexec/PlistBuddy {} -c 'Print :CFBundleIdentifier' } merge_sources () { diff --git a/developer/bin/list_ids_in_pkg b/developer/bin/list_ids_in_pkg index a6e17481ba..ddb86606c8 100755 --- a/developer/bin/list_ids_in_pkg +++ b/developer/bin/list_ids_in_pkg @@ -32,9 +32,7 @@ bundle_id_source_1 () { bundle_id_source_2 () { /usr/bin/find "$pkgdir" -name Info.plist -print0 | \ - "$xargs" -0 /usr/bin/plutil -convert xml1 -o - -- 2> /dev/null | \ - /usr/bin/perl -0777 -ne \ - 'while (m{\s*CFBundleIdentifier\s*\s*([^<]+?)}sg) { print "$1\n" }' + "$xargs" -0 -I {} /usr/libexec/PlistBuddy {} -c 'Print :CFBundleIdentifier' } merge_sources () {