Created
July 17, 2013 17:06
-
-
Save nmcspadden/6022460 to your computer and use it in GitHub Desktop.
Automunki Flash
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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