Skip to content

Instantly share code, notes, and snippets.

@mckern
Created November 24, 2014 19:31
Show Gist options
  • Save mckern/a5606e7e11100e5cdaec to your computer and use it in GitHub Desktop.
Save mckern/a5606e7e11100e5cdaec to your computer and use it in GitHub Desktop.
Blue Jeans browser plugiin 'preinstall' script
#!/bin/sh
#
# Installation script that bypasses normal installation procedures and instead
# delivers the payload (the plugin) directly to the user directory
#
# Blue Jeans Network, 2012 - Luke Ma
# ===========================================================================
# Remove old plugin
rm -rf ~/Library/Internet\ Plug-Ins/rbjnplugin*
rm -rf ~/Library/Internet\ Plug-Ins/rbjninstallplugin*
if [ ! -d ~/Library/Internet\ Plug-Ins ]; then
mkdir ~/Library/Internet\ Plug-Ins
fi
# Install new plugin
mv -f rbjnplugin* ~/Library/Internet\ Plug-Ins/
mv -f rbjninstallplugin* ~/Library/Internet\ Plug-Ins
# FF workaround - explicitly change date modified/permissions to ensure that
# FF will pick up new version of plugin right away
touch ~/Library/Internet\ Plug-Ins/rbjnplugin*
chmod 755 ~/Library/Internet\ Plug-Ins/rbjnplugin*
touch ~/Library/Internet\ Plug-Ins/rbjninstallplugin*
chmod 755 ~/Library/Internet\ Plug-Ins/rbjninstallplugin*
# Kill Installer as we no longer need it
kill $PPID
# Done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment