File: postinst

package info (click to toggle)
xsysinfo 1.6-3
  • links: PTS
  • area: main
  • in suites: hamm, slink
  • size: 168 kB
  • ctags: 507
  • sloc: ansic: 717; makefile: 535; sh: 41
file content (45 lines) | stat: -rw-r--r-- 900 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
#!/bin/sh
#
# This is the original (1.5-4) postinst script.

set -e

case "$1" in
    configure)

        cd /usr/X11R6/lib/X11/app-defaults

        if [ -e XSysinfo ]; then exit 0; fi

	echo "There are two application defaults (app-defaults) files for xsysinfo:"
	echo -n "XSysinfo-mono and XSysinfo-color.  Which one would you like to use? [c/m] "
	read ANSWER
	while true
	do
	    case "$ANSWER" in
		[cC]* )
		    echo -n "Linking XSysinfo-color to XSysinfo..."
		    ln -s XSysinfo-color XSysinfo
		    break
		;;
		[mM]* )
		    echo -e "Linking XSysinfo-mono to XSysinfo..."
		    ln -s XSysinfo-mono XSysinfo
		    break
		;;
		* )
		    echo -n "You must specify either \`c' or \`m' [c/m]: "
		    read ANSWER
		;;
	    esac
	done
	echo "done"
	;;
    abort-upgrade|abort-remove|abort-deconfigure)
	exit 0
	;;
    *)
	echo "postinst called with unknown argument \`$1'" >&2
	exit 0
	;;
esac