From 32bebd38ca18791a84a0cdf1ced3e6c797b02f4b Mon Sep 17 00:00:00 2001 From: Nicolas Boisselier Date: Sat, 17 Sep 2016 18:44:42 +0100 Subject: [PATCH] mac_pkg_list_todel --- etc/profile.d/mac.sh | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/etc/profile.d/mac.sh b/etc/profile.d/mac.sh index 27bce9f0..14fe6422 100644 --- a/etc/profile.d/mac.sh +++ b/etc/profile.d/mac.sh @@ -70,6 +70,11 @@ mac_xmessage() { osascript -e "tell app \"System Events\" to display dialog \"$@\"" } +mac_pkg_list_todel() { + pkgutil --only-files --files "$1" && \ + for d in $(pkgutil --only-dirs --files "$1"); do [ -d "/$d" ] && [[ -z $(ls -A "/$d") ]] || echo $d; done +} + mac_install_dmg() { # NB 17.09.16 local file # NB 17.09.16 case "$1" in -- 2.47.3