Debian Codegraph @

debian/mpg123.postinst

raw
1 #!/bin/sh
2
3 set -e
4
5 install_alternative()
6 {
7 test -n "$1" || continue
8 test -n "$2" || continue
9
10 FILENAME="$1"
11 PRIORITY="$2"
12
13 test -e "/usr/bin/$FILENAME" || continue
14
15 update-alternatives --install \
16 /usr/bin/mp3-decoder mp3-decoder "/usr/bin/$FILENAME" \
17 "$PRIORITY" \
18 --slave /usr/share/man/man1/mp3-decoder.1.gz \
19 mp3-decoder.1.gz \
20 "/usr/share/man/man1/$FILENAME.1.gz"
21 }
22
23 case "$1" in
24 configure)
25 # Install generic binary as the only alternative.
26 install_alternative mpg123 20
27 ;;
28 abort-upgrade|abort-remove|abort-deconfigure)
29 ;;
30 *)
31 echo "postinst called with unknown argument \'$1\'" >&2
32 exit 0
33 esac
34
35 #DEBHELPER#
36
37 exit 0
38