From 1e2dd7faa0b9b881f7f6a279533de341177bfc36 Mon Sep 17 00:00:00 2001 From: Nicolas Boisselier Date: Sat, 17 Sep 2016 17:10:46 +0100 Subject: [PATCH] mac_install_dmg --- etc/profile.d/mac.sh | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/etc/profile.d/mac.sh b/etc/profile.d/mac.sh index 6f8b08c2..27bce9f0 100644 --- a/etc/profile.d/mac.sh +++ b/etc/profile.d/mac.sh @@ -71,19 +71,19 @@ mac_xmessage() { } mac_install_dmg() { - local file - case "$1" in - http*) - file=$(mktemp) - echo "$file" - trap 'rm -f -- "$file"' INT TERM HUP EXIT - curl "$1" -o "$file" || return - ;; - *) - file="$1" - ;; - esac - local MOUNTDIR=$(echo `hdiutil mount "$file" | tail -1 | awk '{$1=$2=""; print $0}'` | xargs -0 echo) +# NB 17.09.16 local file +# NB 17.09.16 case "$1" in +# NB 17.09.16 http*) +# NB 17.09.16 file=$(mktemp) +# NB 17.09.16 echo "$file" +# NB 17.09.16 trap 'rm -f -- "$file"' INT TERM HUP EXIT +# NB 17.09.16 curl "$1" -o "$file" || return +# NB 17.09.16 ;; +# NB 17.09.16 *) +# NB 17.09.16 file="$1" +# NB 17.09.16 ;; +# NB 17.09.16 esac + local MOUNTDIR=$(echo `hdiutil mount "$1" | tail -1 | awk '{$1=$2=""; print $0}'` | xargs -0 echo) sudo installer -verbose -pkg "${MOUNTDIR}/"*.pkg -target / sudo hdiutil detach "${MOUNTDIR}" } -- 2.47.3