File: postinst

package info (click to toggle)
php-idn 1.2b-5.3
  • links: PTS
  • area: main
  • in suites: lenny
  • size: 328 kB
  • ctags: 92
  • sloc: ansic: 682; xml: 624; makefile: 76; sh: 38; php: 10
file content (41 lines) | stat: -rwxr-xr-x 677 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
#!/bin/sh -e

PECL_NAME=idn

if [ "$DPKG_DEBUG" = "developer" ]; then
  set -x
fi

case "$1" in
	configure)

	# source debconf stuff
	if [ -f /usr/share/debconf/confmodule ]; then
		. /usr/share/debconf/confmodule
	fi

	ucf /usr/share/php5-$PECL_NAME/$PECL_NAME.ini-dist \
	   /etc/php5/conf.d/$PECL_NAME.ini

	db_get php5/add_extension || true
	add_extension="$RET"	

	if [ $add_extension = "true" ]; then
		sed -e "s/#extension/extension/" -i \
		    /etc/php5/conf.d/$PECL_NAME.ini
	else
		sed -e "s/^extension/#extension/" -i \
		    /etc/php5/conf.d/$PECL_NAME.ini
	fi
		
	;;

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

#DEBHELPER#