summaryrefslogtreecommitdiffstats
path: root/source4/script/installman.sh
blob: 3350eb87bc1a126debdd702f9f59a7593d5032d8 (plain)
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
#!/bin/sh

MANDIR=$1
shift 1
MANPAGES=$*

for I in $MANPAGES
do
	SECTION=`echo -n $I | sed "s/.*\(.\)$/\1/"`
	DIR="$MANDIR/man$SECTION"
	if [ ! -d "$DIR" ]
	then
		mkdir "$DIR"
	fi

	BASE=`basename $I`
	
	echo "Installing manpage \"$BASE\" in $DIR"
	cp $I $DIR
done

cat << EOF
======================================================================
The man pages have been installed. You may uninstall them using the command
the command "make uninstallman" or make "uninstall" to uninstall binaries,
man pages and shell scripts.
======================================================================
EOF

exit 0