| 1 | #!/bin/sh |
| 2 | |
| 3 | set -e |
| 4 | |
| 5 | pathfind() { |
| 6 | OLDIFS="$IFS" |
| 7 | IFS=: |
| 8 | for p in $PATH; do |
| 9 | if [ -x "$p/$*" ]; then |
| 10 | IFS="$OLDIFS" |
| 11 | return 0 |
| 12 | fi |
| 13 | done |
| 14 | IFS="$OLDIFS" |
| 15 | return 1 |
| 16 | } |
| 17 | |
| 18 | |
| 19 | case "$1" in |
| 20 | remove|upgrade|deconfigure) |
| 21 | if $(pathfind update-gsfontmap); then |
| 22 | update-gsfontmap |
| 23 | fi |
| 24 | ;; |
| 25 | |
| 26 | failed-upgrade) |
| 27 | ;; |
| 28 | |
| 29 | *) |
| 30 | echo "prerm called with unknown argument \`$1'" >&2 |
| 31 | exit 1 |
| 32 | ;; |
| 33 | esac |
| 34 | |
| 35 | # dh_installdeb will replace this with shell code automatically |
| 36 | # generated by other debhelper scripts. |
| 37 | |
| 38 | #DEBHELPER# |
| 39 | |
| 40 | exit 0 |