Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(289)

Unified Diff: installer/linux/debian_amd64/postinst

Issue 149132: Initial support for Linux installers. Currently just an amd64 .deb, but more ... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/o3d/
Patch Set: '' Created 11 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « installer/linux/debian_amd64/links ('k') | installer/linux/debian_amd64/prerm » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: installer/linux/debian_amd64/postinst
===================================================================
--- installer/linux/debian_amd64/postinst (revision 0)
+++ installer/linux/debian_amd64/postinst (revision 0)
@@ -0,0 +1,62 @@
+#!/bin/sh
+# postinst 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"
+ NSPW_OPTS="-n"
+else
+ WRAPPED_PLUGIN_PATH="/usr/lib/mozilla/plugins/npwrapper.libnpo3dautoplugin.so"
+ APPS="iceape iceweasel firefox xulrunner midbrowser xulrunner-addons"
+ NSPW_OPTS=""
+fi
+
+case "$1" in
+ configure)
+ if ! which nspluginwrapper 2>&1 > /dev/null; then
+ echo "Error: nspluginwrapper not found. Please run \`sudo apt-get install nspluginwrapper' or equivalent." >&2
+ exit 1
+ fi
+ # Install the wrapper.
+ nspluginwrapper $NSPW_OPTS -i /opt/google/o3d/libnpo3dautoplugin.so
+ if test ! -f $WRAPPED_PLUGIN_PATH; then
+ echo "Can't find where the wrapped plugin was installed to." >&2
+ exit 1
+ fi
+ # Symlink to everywhere.
+ for app in $APPS; do
+ ln -sf $WRAPPED_PLUGIN_PATH /usr/lib/$app/plugins/
+ done
+ ;;
+
+ abort-upgrade|abort-remove|abort-deconfigure)
+ echo "postinst called with argument \`$1'" >&2
+ exit 1
+ ;;
+
+ *)
+ echo "postinst 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
Property changes on: installer/linux/debian_amd64/postinst
___________________________________________________________________
Name: svn:executable
+ *
« no previous file with comments | « installer/linux/debian_amd64/links ('k') | installer/linux/debian_amd64/prerm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698