diff --git a/developer/bin/list_ids_in_pkg b/developer/bin/list_ids_in_pkg index 01afc94d9b..c7e4e97413 100755 --- a/developer/bin/list_ids_in_pkg +++ b/developer/bin/list_ids_in_pkg @@ -7,6 +7,27 @@ set -e # exit on any uncaught error set +o histexpand # don't expand history expressions shopt -s nocasematch # case-insensitive regular expressions +bundle_id_source_1 () { + /usr/bin/find "$tmpdir" -name PackageInfo -print0 | \ + /usr/bin/xargs -0 /usr/bin/perl -0777 -ne \ + 'while (m{/dev/null 2>&1 && printf " (+)"; printf "\n"' +} + _list_ids_in_pkg () { local tmpdir=`/usr/bin/mktemp -d -t list_ids_in_pkg` @@ -14,15 +35,13 @@ _list_ids_in_pkg () { /usr/sbin/pkgutil --expand "$1" "$tmpdir/unpack" - /usr/bin/find "$tmpdir" -name PackageInfo -print0 | \ - /usr/bin/xargs -0 /usr/bin/perl -0777 -ne \ - 'while (m{/dev/null 2>&1 && printf " (+)"; printf "\n"' + { + # emit strings that look like bundle ids + bundle_id_source_1; + } | \ + merge_sources | \ + clean_sources | \ + mark_up_sources }