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