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

Side by Side 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « installer/linux/debian_amd64/links ('k') | installer/linux/debian_amd64/prerm » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Property Changes:
Name: svn:executable
+ *
OLDNEW
(Empty)
1 #!/bin/sh
2 # postinst script for google-o3d
3
4 set -e
5
6 # Find out which Debian-derived distro this is.
7 . /etc/lsb-release
8 if test "$DISTRIB_ID" = Ubuntu; then
9 distro=Ubuntu
10 else
11 distro=Other
12 fi
13
14 # The nspluginwrapper package in Ubuntu behaves differently from upstream. By
15 # default it installs the wrapped plugin to multiple directories. -n must be
16 # used to suppress this. Additionally, when using -n the directory that it
17 # installs to is still different. Hence the logic here.
18 if test $distro = Ubuntu; then
19 WRAPPED_PLUGIN_PATH="/usr/lib/nspluginwrapper/plugins/npwrapper.libnpo3dautopl ugin.so"
20 APPS="iceape iceweasel mozilla firefox xulrunner midbrowser xulrunner-addons"
21 NSPW_OPTS="-n"
22 else
23 WRAPPED_PLUGIN_PATH="/usr/lib/mozilla/plugins/npwrapper.libnpo3dautoplugin.so"
24 APPS="iceape iceweasel firefox xulrunner midbrowser xulrunner-addons"
25 NSPW_OPTS=""
26 fi
27
28 case "$1" in
29 configure)
30 if ! which nspluginwrapper 2>&1 > /dev/null; then
31 echo "Error: nspluginwrapper not found. Please run \`sudo apt-get install nspluginwrapper' or equivalent." >&2
32 exit 1
33 fi
34 # Install the wrapper.
35 nspluginwrapper $NSPW_OPTS -i /opt/google/o3d/libnpo3dautoplugin.so
36 if test ! -f $WRAPPED_PLUGIN_PATH; then
37 echo "Can't find where the wrapped plugin was installed to." >&2
38 exit 1
39 fi
40 # Symlink to everywhere.
41 for app in $APPS; do
42 ln -sf $WRAPPED_PLUGIN_PATH /usr/lib/$app/plugins/
43 done
44 ;;
45
46 abort-upgrade|abort-remove|abort-deconfigure)
47 echo "postinst called with argument \`$1'" >&2
48 exit 1
49 ;;
50
51 *)
52 echo "postinst called with unknown argument \`$1'" >&2
53 exit 1
54 ;;
55 esac
56
57 # dh_installdeb will replace this with shell code automatically
58 # generated by other debhelper scripts.
59
60 #DEBHELPER#
61
62 exit 0
OLDNEW
« 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