I'm automating my Mac installation using puppet. As a part of it I need to install several programs that come in a .dmg format.
I use the following to mount them:
sudo /usr/bin/hdiutil mount -plist -nobrowse -readonly -quiet -mountrandom /tmp Program.dmg
The problem is that some .dmg files come with a license attached, and so script is stuck accepting the license. (There is no stdin/out when running with puppet, so I can't manually approve it to continue.)
Is there a way to pre-approve or force-approve the license?
Best Answer
If you have a GUI and are able to perform two command-line calls in parallel, you can use
and
the latter of which executes the following AppleScript:
In
bash
, I'm able to write