File: postinst

package info (click to toggle)
aptlinex 0.91-1
  • links: PTS
  • area: main
  • in suites: lenny, squeeze
  • size: 372 kB
  • ctags: 16
  • sloc: sh: 692; makefile: 75
file content (46 lines) | stat: -rw-r--r-- 1,157 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
#!/bin/sh
set -e


case "$1" in
    configure)

     #register in Iceweasel:
     if [ -e  /usr/lib/iceweasel/iceweasel.cfg ]; then
     	ICEWEASEL=`grep "handler.app.apt" /usr/lib/iceweasel/iceweasel.cfg ||true`
	 	if [ -z "$ICEWEASEL" ]; then
			echo "lockPref(\"network.protocol-handler.app.apt\",\"/usr/bin/gambas-apt.gambas\");
lockPref(\"network.protocol-handler.warn-external.apt\", false);" >> /usr/lib/iceweasel/iceweasel.cfg
	 	fi
	 fi

     #register in Firefox:
     if [ -e  /usr/lib/firefox/firefox.cfg ]; then
     	FIREFOX=`grep handler.app.apt /usr/lib/firefox/firefox.cfg ||true`
	 	if [ -z "$FIREFOX" ]; then
			echo "lockPref(\"network.protocol-handler.app.apt\",\"/usr/bin/gambas-apt.gambas\");
lockPref(\"network.protocol-handler.warn-external.apt\", false);" >> /usr/lib/firefox/firefox.cfg
	 	fi
	 fi
	
     #Gnome integration (for galeon & epiphany):
	 if which gconf-schemas >/dev/null 2>&1; then
		gconf-schemas --register aptlinex.schemas
	 fi

	 ;;

    abort-upgrade|abort-remove|abort-deconfigure)
    ;;

    *)
        echo "postinst called with unknown argument \`$1'" >&2
        exit 1
    ;;
esac

#DEBHELPER#

exit 0