Skip to content

Instantly share code, notes, and snippets.

@nmcspadden
Created July 17, 2013 17:06
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save nmcspadden/6022460 to your computer and use it in GitHub Desktop.
Save nmcspadden/6022460 to your computer and use it in GitHub Desktop.
Automunki Flash
#!/bin/bash -ex
pwd="`pwd`"
# download latest
ftp -o flash.dmg http://fpdownload.macromedia.com/get/flashplayer/current/licensing/mac/install_flash_player_11_osx.dmg
# Mount disk image on temp space
mountpoint=`hdiutil attach -mountrandom /tmp -nobrowse flash.dmg | awk '/private\/tmp/ { print $3 } '`
echo Mounted on $mountpoint
# Obtain version
version=`/usr/libexec/PlistBuddy -c "Print :CFBundleShortVersionString" "$mountpoint/Install Adobe Flash Player.app/Contents/Resources/Adobe Flash Player.pkg/Contents/Info.plist"`
# Make a disk image with just the framework on it
hdiutil detach "$mountpoint"
mv flash.dmg AdobeFlashPlayer-${version}.dmg
#/usr/local/munki/makepkginfo AdobeFlashPlayer-${version}.dmg -p 'Install Adobe Flash Player.app/Contents/Resources/Adobe Flash Player.pkg' > "$plist"
/usr/local/munki/munkiimport AdobeFlashPlayer-${version}.dmg -p 'Install Adobe Flash Player.app/Contents/Resources/Adobe Flash Player.pkg' --minimum_os_version=10.6.0 --displayname="Adobe Flash Plugin" --name="AdobeFlash"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment