From 52c9a5b22455e3cc4950160dee2ade50528b3acd Mon Sep 17 00:00:00 2001 From: Andrey Filipenkov Date: Wed, 22 Jan 2020 20:42:57 +0300 Subject: [macos][packaging] fix parsing device handle of a mounted dmg `/dev/disk` can have arbitrary amount of digits --- tools/darwin/packaging/osx/dmgmaker.pl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/darwin/packaging/osx/dmgmaker.pl b/tools/darwin/packaging/osx/dmgmaker.pl index e728e866d5..c67f33d00f 100755 --- a/tools/darwin/packaging/osx/dmgmaker.pl +++ b/tools/darwin/packaging/osx/dmgmaker.pl @@ -35,7 +35,7 @@ sub make_dmg { `hdiutil create -fs HFS+ -volname "$pkgname" -format UDRW -srcfolder "$mpkg" "$volname.dmg"`; $dev_handle = `hdiutil attach -readwrite -noverify -noautoopen "$volname.dmg" | grep Apple_HFS`; chomp $dev_handle; - $dev_handle = $1 if $dev_handle =~ /^\/dev\/(disk.)/; + $dev_handle = $1 if $dev_handle =~ /^\/dev\/(disk\d+)/; die("Could not obtain device handle\n") if !$dev_handle; print "Got device handle \"$dev_handle\"\n"; #clear the volume - we will copy stuff on it with ditto later -- cgit v1.2.3