Last active
June 4, 2016 21:51
-
-
Save stefanschmidt/9510292 to your computer and use it in GitHub Desktop.
Installing the Flash plugin in your home folder on OS X (without admin rights)
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
FLASH_URL="http://fpdownload.macromedia.com/get/flashplayer/current/licensing/mac/install_flash_player_12_osx.dmg" | |
FLASH_DMG=$(mktemp -d -t flash_dmg)/flash.dmg | |
FLASH_MOUNTPOINT=$(mktemp -d -t flash_mountpoint) | |
FLASH_PKG="$FLASH_MOUNTPOINT/Install Adobe Flash Player.app/Contents/Resources/Adobe Flash Player.pkg" | |
curl -o $FLASH_DMG $FLASH_URL | |
hdiutil attach -mountpoint $FLASH_MOUNTPOINT -nobrowse $FLASH_DMG | |
FLASH_PKG_ARCHIVE="$FLASH_MOUNTPOINT/Install Adobe Flash Player.app/Contents/Resources/Adobe Flash Player.pkg" | |
FLASH_PKG_EXTRACT_DIR=$(mktemp -d -t flash_pkg_extract_dir) | |
FLASH_INSTALL_SRC="$FLASH_PKG_EXTRACT_DIR/AdobeFlashPlayerComponent.pkg" | |
cd "$FLASH_PKG_EXTRACT_DIR" | |
xar -xf "$FLASH_PKG_ARCHIVE" | |
cd "$FLASH_INSTALL_SRC" | |
cat Payload | gunzip -dc | cpio -i | |
cat Scripts | gunzip -dc | cpio -i | |
mkdir -p "$HOME/Library/Internet Plug-Ins" | |
mkdir -p "$HOME/Library/PreferencePanes" | |
cp -f "$FLASH_INSTALL_SRC/Library/Internet Plug-Ins/Flash Player.plugin.lzma" "$HOME/Library/Internet Plug-Ins" | |
cp -f "$FLASH_INSTALL_SRC/Library/Internet Plug-Ins/flashplayer.xpt" "$HOME/Library/Internet Plug-Ins" | |
cp -fr "$FLASH_INSTALL_SRC/Library/PreferencePanes/Flash Player.prefPane" "$HOME/Library/PreferencePanes" | |
# extracts the lzma archive in ~/Library/Internet Plug-Ins | |
"$FLASH_INSTALL_SRC/finalize" "$HOME" | |
hdiutil detach $FLASH_MOUNTPOINT -force |
Thank you cielavenir and stefanschmidt
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Thank you for the cool script.
I have updated a little to add PPAPI edition. Also it supports lazy global upgrade (why the installer asks to close Google Chrome?).
https://gist.github.com/cielavenir/e1faf90c3ee21c52258e