1 | #!/bin/sh |
---|
2 | # postinst script for debathena-locker-menu |
---|
3 | # |
---|
4 | # see: dh_installdeb(1) |
---|
5 | |
---|
6 | set -e |
---|
7 | |
---|
8 | # summary of how this script can be called: |
---|
9 | # * <postinst> `configure' <most-recently-configured-version> |
---|
10 | # * <old-postinst> `abort-upgrade' <new version> |
---|
11 | # * <conflictor's-postinst> `abort-remove' `in-favour' <package> |
---|
12 | # <new-version> |
---|
13 | # * <postinst> `abort-remove' |
---|
14 | # * <deconfigured's-postinst> `abort-deconfigure' `in-favour' |
---|
15 | # <failed-install-package> <version> `removing' |
---|
16 | # <conflicting-package> <version> |
---|
17 | # for details, see http://www.debian.org/doc/debian-policy/ or |
---|
18 | # the debian-policy package |
---|
19 | |
---|
20 | SHAREDIR="/usr/share/debathena-locker-menu" |
---|
21 | ICON_NONFREE_DIR="/usr/share/debathena-locker-menu/icons-nonfree" |
---|
22 | ICONS="acroread.png mathematica.png maple.png sas.png stata.png tecplot.png xess.png" |
---|
23 | |
---|
24 | # Source debconf library. |
---|
25 | . /usr/share/debconf/confmodule |
---|
26 | |
---|
27 | case "$1" in |
---|
28 | configure) |
---|
29 | db_get debathena-locker-menu/license |
---|
30 | if [ "$RET" = "true" ]; then |
---|
31 | echo "Using real icons for debathena-locker-menu..." >&2 |
---|
32 | for i in $ICONS; do |
---|
33 | if ! cp -f "$ICON_NONFREE_DIR/$i" "$SHAREDIR/$i"; then |
---|
34 | echo "Can't find real icon for $i, falling back to generic" >&2 |
---|
35 | ln -nsf "$SHAREDIR/generic-icon.png" "$SHAREDIR/$i" |
---|
36 | fi |
---|
37 | done |
---|
38 | else |
---|
39 | echo "Using generic icons for debathena-locker-menu..." >&2 |
---|
40 | for i in $ICONS; do |
---|
41 | ln -nsf "$SHAREDIR/generic-icon.png" "$SHAREDIR/$i" |
---|
42 | done |
---|
43 | fi |
---|
44 | ;; |
---|
45 | |
---|
46 | abort-upgrade|abort-remove|abort-deconfigure) |
---|
47 | ;; |
---|
48 | |
---|
49 | *) |
---|
50 | echo "postinst called with unknown argument \`$1'" >&2 |
---|
51 | exit 1 |
---|
52 | ;; |
---|
53 | esac |
---|
54 | |
---|
55 | # dh_installdeb will replace this with shell code automatically |
---|
56 | # generated by other debhelper scripts. |
---|
57 | |
---|
58 | #DEBHELPER# |
---|
59 | |
---|
60 | exit 0 |
---|