Skip to content

Instantly share code, notes, and snippets.

@kbansal
Last active August 29, 2015 14:01
Show Gist options
  • Save kbansal/fe09e7dde81b3e451b0d to your computer and use it in GitHub Desktop.
Save kbansal/fe09e7dde81b3e451b0d to your computer and use it in GitHub Desktop.

Revisions

  1. kbansal revised this gist Aug 27, 2014. 1 changed file with 12 additions and 5 deletions.
    17 changes: 12 additions & 5 deletions UpdateFlashMac.sh
    Original file line number Diff line number Diff line change
    @@ -1,8 +1,16 @@
    #!/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

    MINOR=145
    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
    @@ -12,13 +20,12 @@ cd /tmp/flashinstall
    # Get the archive and mount the dmg
    umount -f /Volumes/"Flash Player" || echo Not Mounted
    sleep 1
    wget "http://download.macromedia.com/pub/flashplayer/installers/archive/fp_14.0.0.${MINOR}_archive.zip" -O fp.zip
    unzip fp.zip
    open fp_*/14_0_r0_$MINOR/flashplayer14_0r0_${MINOR}_mac.dmg
    wget $DMG_URL -O fp.dmg
    open fp.dmg
    sleep 5

    # Retreive and extract the pkg inside it
    cp /Volumes/"Flash Player"/*.app/*/*/*.pkg /tmp/flashinstall
    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
  2. kbansal revised this gist Aug 2, 2014. 1 changed file with 3 additions and 11 deletions.
    14 changes: 3 additions & 11 deletions UpdateFlashMac.sh
    Original file line number Diff line number Diff line change
    @@ -1,16 +1,8 @@
    #!/bin/bash -x
    #
    # Installs just the plugin -- no flash manager, no fpsaud,
    # no system preferences, no lightroom -- the way it should
    # be.
    #
    # Version 13.0.0.214
    #
    # (Requires wget, but change it to curl if you don't have it)

    set -e

    MINOR=214
    MINOR=145

    # Clear any old installation directories
    rm -rf /tmp/flashinstall
    @@ -20,9 +12,9 @@ cd /tmp/flashinstall
    # Get the archive and mount the dmg
    umount -f /Volumes/"Flash Player" || echo Not Mounted
    sleep 1
    wget "http://download.macromedia.com/pub/flashplayer/installers/archive/fp_13.0.0.${MINOR}_archive.zip" -O fp.zip
    wget "http://download.macromedia.com/pub/flashplayer/installers/archive/fp_14.0.0.${MINOR}_archive.zip" -O fp.zip
    unzip fp.zip
    open fp_*/13_0_r0_$MINOR/flashplayer13_0r0_${MINOR}_mac.dmg
    open fp_*/14_0_r0_$MINOR/flashplayer14_0r0_${MINOR}_mac.dmg
    sleep 5

    # Retreive and extract the pkg inside it
  3. kbansal created this gist May 21, 2014.
    43 changes: 43 additions & 0 deletions UpdateFlashMac.sh
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,43 @@
    #!/bin/bash -x
    #
    # Installs just the plugin -- no flash manager, no fpsaud,
    # no system preferences, no lightroom -- the way it should
    # be.
    #
    # Version 13.0.0.214
    #
    # (Requires wget, but change it to curl if you don't have it)

    set -e

    MINOR=214

    # 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 "http://download.macromedia.com/pub/flashplayer/installers/archive/fp_13.0.0.${MINOR}_archive.zip" -O fp.zip
    unzip fp.zip
    open fp_*/13_0_r0_$MINOR/flashplayer13_0r0_${MINOR}_mac.dmg
    sleep 5

    # Retreive and extract the pkg inside it
    cp /Volumes/"Flash Player"/*.app/*/*/*.pkg /tmp/flashinstall
    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