summaryrefslogtreecommitdiffstats
path: root/source4/script/installman.sh
blob: ae99bceacf08f9017dc7bc11f68b479d25b1e2c4 (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 $I | grep -o '.$'`
	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