[25674] | 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" |
---|
[25695] | 22 | # If you change this list, change it in the postrm too |
---|
[25674] | 23 | ICONS="acroread.png mathematica.png maple.png sas.png stata.png tecplot.png xess.png" |
---|
| 24 | |
---|
| 25 | # Source debconf library. |
---|
| 26 | . /usr/share/debconf/confmodule |
---|
| 27 | |
---|
| 28 | case "$1" in |
---|
| 29 | configure) |
---|
| 30 | db_get debathena-locker-menu/license |
---|
| 31 | if [ "$RET" = "true" ]; then |
---|
| 32 | echo "Using real icons for debathena-locker-menu..." >&2 |
---|
| 33 | for i in $ICONS; do |
---|
[25703] | 34 | if ! [ -f "$ICON_NONFREE_DIR/$i" ] || \ |
---|
| 35 | ! ln -nsf "$ICON_NONFREE_DIR/$i" "$SHAREDIR/$i"; then |
---|
[25695] | 36 | echo "Can't find or link real icon for $i, falling back to generic" >&2 |
---|
[25674] | 37 | ln -nsf "$SHAREDIR/generic-icon.png" "$SHAREDIR/$i" |
---|
| 38 | fi |
---|
| 39 | done |
---|
| 40 | else |
---|
| 41 | echo "Using generic icons for debathena-locker-menu..." >&2 |
---|
| 42 | for i in $ICONS; do |
---|
| 43 | ln -nsf "$SHAREDIR/generic-icon.png" "$SHAREDIR/$i" |
---|
| 44 | done |
---|
| 45 | fi |
---|
| 46 | ;; |
---|
| 47 | |
---|
| 48 | abort-upgrade|abort-remove|abort-deconfigure) |
---|
| 49 | ;; |
---|
| 50 | |
---|
| 51 | *) |
---|
| 52 | echo "postinst called with unknown argument \`$1'" >&2 |
---|
| 53 | exit 1 |
---|
| 54 | ;; |
---|
| 55 | esac |
---|
| 56 | |
---|
| 57 | # dh_installdeb will replace this with shell code automatically |
---|
| 58 | # generated by other debhelper scripts. |
---|
| 59 | |
---|
| 60 | #DEBHELPER# |
---|
| 61 | |
---|
| 62 | exit 0 |
---|