diff options
author | tschmelcher@google.com <tschmelcher@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-07-07 18:39:12 +0000 |
---|---|---|
committer | tschmelcher@google.com <tschmelcher@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-07-07 18:39:12 +0000 |
commit | 2e8f3dd5dbec1c494778713c47a42f6589ecbc86 (patch) | |
tree | 8ad97d238e4eb9408464e3d46553b869091cddbf /o3d/installer/linux/debian_amd64/prerm | |
parent | 53e32fe539f0f8a9b13bbe0c348c325f20758a5f (diff) | |
download | chromium_src-2e8f3dd5dbec1c494778713c47a42f6589ecbc86.zip chromium_src-2e8f3dd5dbec1c494778713c47a42f6589ecbc86.tar.gz chromium_src-2e8f3dd5dbec1c494778713c47a42f6589ecbc86.tar.bz2 |
Initial support for Linux installers. Currently just an amd64 .deb, but more later.
Review URL: http://codereview.chromium.org/149132
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@20051 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'o3d/installer/linux/debian_amd64/prerm')
-rwxr-xr-x | o3d/installer/linux/debian_amd64/prerm | 61 |
1 files changed, 61 insertions, 0 deletions
diff --git a/o3d/installer/linux/debian_amd64/prerm b/o3d/installer/linux/debian_amd64/prerm new file mode 100755 index 0000000..44c9646 --- /dev/null +++ b/o3d/installer/linux/debian_amd64/prerm @@ -0,0 +1,61 @@ +#!/bin/sh +# prerm script for google-o3d + +set -e + +# Find out which Debian-derived distro this is. +. /etc/lsb-release +if test "$DISTRIB_ID" = Ubuntu; then + distro=Ubuntu +else + distro=Other +fi + +# The nspluginwrapper package in Ubuntu behaves differently from upstream. By +# default it installs the wrapped plugin to multiple directories. -n must be +# used to suppress this. Additionally, when using -n the directory that it +# installs to is still different. Hence the logic here. +if test $distro = Ubuntu; then + WRAPPED_PLUGIN_PATH="/usr/lib/nspluginwrapper/plugins/npwrapper.libnpo3dautoplugin.so" + APPS="iceape iceweasel mozilla firefox xulrunner midbrowser xulrunner-addons" +else + WRAPPED_PLUGIN_PATH="/usr/lib/mozilla/plugins/npwrapper.libnpo3dautoplugin.so" + APPS="iceape iceweasel firefox xulrunner midbrowser xulrunner-addons" +fi + +case "$1" in + remove|upgrade|deconfigure) + # Remove the symlinks. + for app in $APPS; do + # Don't fail if it happens to not be there. User might have removed it + # themselves, for example. + rm -f /usr/lib/$app/plugins/npwrapper.libnpo3dautoplugin.so + done + if ! which nspluginwrapper 2>&1 > /dev/null; then + echo "Warning: nspluginwrapper not found. Some files may be left over." >&2 + else + # Remove the wrapper. Again, don't fail. + nspluginwrapper -r $WRAPPED_PLUGIN_PATH || { echo "Warning: Unable to remove wrapped plugin. Some files may be left over." >&2; } + fi + ;; + + failed-upgrade) + # Executing "old-prerm upgrade" failed. This gets called to take over. + # If it succeeds, the upgrade continues and postinst is later called. + # We don't want users to get stuck on an old version, so we always continue + # the upgrade. + echo "Warning: continuing upgrade even though old version wasn't successfully deconfigured" >&2 + ;; + + *) + echo "prerm called with unknown argument \`$1'" >&2 + exit 1 + ;; +esac + +# dh_installdeb will replace this with shell code automatically +# generated by other debhelper scripts. + +#DEBHELPER# + +exit 0 |