File: xdvik-ja.postinst

package info (click to toggle)
xdvik-ja 22.87.06%2Bj1.42-3
  • links: PTS, VCS
  • area: main
  • in suites: sid, trixie
  • size: 8,032 kB
  • sloc: ansic: 61,384; makefile: 300; sh: 281; perl: 245; lisp: 244
file content (33 lines) | stat: -rw-r--r-- 916 bytes parent folder | download | duplicates (4)
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
#! /bin/sh
# postinst script for xdvik-ja
#
# see: dh_installdeb(1)

set -e

case "$1" in
    configure|reconfigure)
        if ( dpkg-divert --list /usr/bin/xdvi.nonja | egrep -q ' by xdvik-ja$' ); then
            if [ -f /usr/bin/xdvi -a -f /usr/bin/xdvi.nonja ]; then
                rm -f /usr/bin/xdvi
            fi
            dpkg-divert --package xdvik-ja --remove --rename \
                --divert /usr/bin/xdvi.nonja /usr/bin/xdvi
        fi
        if ( update-alternatives --list xdvi.bin | egrep -q 'xdvi-ja.real' );then
            update-alternatives --remove xdvi.bin /usr/bin/xdvi-ja.real
        fi
        update-alternatives --install /usr/bin/xdvi.bin xdvi.bin \
            /usr/bin/pxdvi-xaw 35
        ;;
    abort-upgrade|abort-remove|abort-deconfigure)
        ;;
    *)
        echo "postinst called with unknown argument \`$1'" >&2
        exit 1
        ;;
esac

#DEBHELPER#

exit 0