Join GitHub today
"Cannot Read OS Version" from Composer captured OS.dmg's #22
Ok.. so the issue seems to be the grep before awk, & bad assumptions I had made in that: https://github.com/macmule/AutoCasperNBI/blob/master/AutoCasperNBI/AutoCasperNBIAppDelegate.applescript#L513
Basically, a Composer captured OS.dmg contains JUST the OS partition. So hdiutil attach output looks like:
Whereas an AutoDMG OS.dmg outputs:
As horrible as the below looks, it returns the correct mount path for both of the above DMGs:
Now we're parsing as a plist & awking out what we need, granted not anywhere near "best practice" but seems to resolve this issue.
Other attempts involved writing a plist & reading from that, but the nested dicts within the arrays gave me some grief (gist below) & with the above working.. i'll put the above into 1.1.5.
Better/more elegant solutions welcome, as long as they can be ran within an AppleScript Objective-C app.