File: postinst

package info (click to toggle)
php-imlib 0.7-1
  • links: PTS
  • area: main
  • in suites: lenny
  • size: 1,020 kB
  • ctags: 817
  • sloc: php: 2,464; ansic: 1,324; xml: 94; makefile: 67; sh: 12
file content (20 lines) | stat: -rw-r--r-- 563 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#!/bin/sh

set -e

# if we're upgrading from a php4 version of the package, we definitely
# don't want to leave footprints around there since we no longer provide 
# php4 functionality
if [ -n "$2" ] && dpkg --compare-versions "$2" lt "0.6-2"; then
	extension_re='^[[:space:]]*extension[[:space:]]*=[[:space:]]*imlib\.so'
	for SAPI in apache cgi apache2 cli caudium; do
		ini_file="/etc/php4/$SAPI/php.ini"
		if [ -f "$ini_file" ]; then
			if grep -q "$extension_re" "$ini_file"; then
				sed -i -e "/$extension_re/d" "$ini_file"
			fi
		fi
	done
fi

#DEBHELPER#