File: postrm

package info (click to toggle)
nukeimage 0.3-8
  • links: PTS
  • area: main
  • in suites: lenny
  • size: 112 kB
  • ctags: 9
  • sloc: sh: 60; makefile: 36
file content (37 lines) | stat: -rw-r--r-- 624 bytes parent folder | download | duplicates (3)
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
#! /bin/sh
set -e

# A cut-down version of 'which' from debianutils.
searchpath () {
	PROGRAM="$1"
	IFS_SAVE="$IFS"
	IFS=:
	RET=1
	for ELEMENT in $PATH; do
		if [ -z "$ELEMENT" ]; then
			ELEMENT=.
		fi
		if [ -f "$ELEMENT/$PROGRAM" ] && \
		   [ -x "$ELEMENT/$PROGRAM" ]; then
			RET=0
			break
		fi
	done
	IFS="$IFS_SAVE"
	return "$RET"
}

if [ "$1" = remove ] || [ "$1" = abort-install ]; then
    for update in update-mozilla-chrome \
		  update-mozilla-snapshot-chrome \
		  update-mozilla-firefox-chrome \
		  update-iceape-chrome; do
	if searchpath "$update"; then
	    "$update"
	fi
    done
fi

#DEBHELPER#

exit 0