#!/bin/bash -x # # Installs just the plugin -- no flash manager, no fpsaud, # no system preferences, no lightroom -- the way it should # be. # # Version 14* # # (Requires wget, but change it to curl if you don't have it) set -e DMG_URL="http://fpdownload.macromedia.com/get/flashplayer/current/licensing/mac/install_flash_player_14_osx_pkg.dmg" # Clear any old installation directories rm -rf /tmp/flashinstall mkdir /tmp/flashinstall cd /tmp/flashinstall # Get the archive and mount the dmg umount -f /Volumes/"Flash Player" || echo Not Mounted sleep 1 wget $DMG_URL -O fp.dmg open fp.dmg sleep 5 # Retreive and extract the pkg inside it cp /Volumes/"Flash Player"/*.pkg /tmp/flashinstall/"Adobe Flash Player.pkg" ls "Adobe Flash Player.pkg" pkgutil --expand "Adobe Flash Player.pkg" a cd a # check plugin exists where we expect it to be tar tf /tmp/flashinstall/a/AdobeFlashPlayerComponent.pkg/Payload "./Library/Internet Plug-Ins/Flash Player.plugin.lzma" # extract file (requires root password) sudo tar -x -C / -f /tmp/flashinstall/a/AdobeFlashPlayerComponent.pkg/Payload "./Library/Internet Plug-Ins/Flash Player.plugin.lzma" # this uncompress the lzma archive to flash plugin (again, requires sudo) sudo /tmp/flashinstall/a/AdobeFlashPlayerComponent.pkg/Scripts/finalize echo Success