From 7c9dfaa8de04ca99448f3a68169095e98f418208 Mon Sep 17 00:00:00 2001 From: "mark%moxienet.com" Date: Mon, 22 Aug 2005 18:35:41 +0000 Subject: [PATCH] Bug 305131, trouble with Mac l10n builds when unpacking dmg files. Harden dmg unpacking. r=bsmedberg git-svn-id: svn://10.0.0.236/trunk@178618 18797224-902f-48f8-a5cc-f745e15eee43 --- mozilla/toolkit/mozapps/installer/packager.mk | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/mozilla/toolkit/mozapps/installer/packager.mk b/mozilla/toolkit/mozapps/installer/packager.mk index 9c5bbdc56bd..c0d78b0439d 100644 --- a/mozilla/toolkit/mozapps/installer/packager.mk +++ b/mozilla/toolkit/mozapps/installer/packager.mk @@ -121,10 +121,12 @@ MAKE_PACKAGE = $(_ABS_TOPSRCDIR)/build/package/mac_osx/pkg-dmg \ UNMAKE_PACKAGE = \ set -e; \ unset NEXT_ROOT; \ + export PAGER=true; \ mkdir mount-temp; \ - hdiutil attach -readonly -mountpoint mount-temp -private -noautoopen $(UNPACKAGE) > hdi.output; \ - DEV_NAME=`egrep '^/dev' < hdi.output | sed 1q | awk '{print $$1}'`; \ - rsync -a mount-temp/$(_APPNAME) $(MOZ_PKG_APPNAME); \ + echo Y | hdiutil attach -readonly -mountpoint mount-temp -private -noautoopen $(UNPACKAGE) > hdi.output; \ + DEV_NAME=`sed -e 's/^.*\(\/dev\/disk[^ ]*\).*$$/\1/;1q' < hdi.output`; \ + MOUNTPOINT=`perl -n -e 'split(/\/dev\/disk[^ ]*/,$$_,2);if($$_[1]=~/(\/.*)/) {print $$1."\n";}'< hdi.output`; \ + rsync -a $${MOUNTPOINT}/$(_APPNAME) $(MOZ_PKG_APPNAME); \ hdiutil detach $${DEV_NAME}; \ $(NULL) endif