File: nmh.postinst

package info (click to toggle)
nmh 1.8~RC2-2
  • links: PTS
  • area: main
  • in suites: bookworm
  • size: 7,864 kB
  • sloc: ansic: 50,445; sh: 22,681; makefile: 1,140; lex: 740; perl: 509; yacc: 265
file content (26 lines) | stat: -rw-r--r-- 828 bytes parent folder | download | duplicates (6)
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
#!/bin/sh
# offer mhmail as alternative for the mail/mailx/Mail commands
set -e

# if necessary: ie. if not present at all, or with the wrong man suffix
if [ "$1" = "configure" ] ; then
		CURRENT=`update-alternatives --display mailx` || true
		if ! echo "$CURRENT" | grep -q mhmail \
						|| echo "$CURRENT" | grep -q mhmail.1.gz ;
		then

				mhm=/usr/bin/mh/mhmail
				bindir=/usr/bin
				mandir=/usr/share/man/man1
				
				update-alternatives --install $bindir/mailx mailx $mhm 25 \
														--slave $bindir/mail mail $mhm \
														--slave $bindir/Mail Mail $mhm \
														--slave $mandir/mailx.1.gz mailx.1.gz $mandir/mhmail.1mh.gz \
														--slave $mandir/mail.1.gz mail.1.gz $mandir/mhmail.1mh.gz \
														--slave $mandir/Mail.1.gz Mail.1.gz $mandir/mhmail.1mh.gz
		fi
fi
		
#DEBHELPER#