Converted to call lib/wins_srv.c:wins_srv_ip() instead of lp_wins_server()
[Samba.git] / source3 / script / installman.sh
blob4eda8fd537fd1374e71d9b2f03e3e2c6b1b05306
1 #!/bin/sh
2 #5 July 96 Dan.Shearer@unisa.edu.au removed hardcoded values
4 MANDIR=$1
5 SRCDIR=$2/
6 if [ $# -ge 3 ] ; then
7 GROFF=$3 # sh cmd line, including options
8 fi
10 echo Installing man pages in $MANDIR
12 for d in $MANDIR $MANDIR/man1 $MANDIR/man5 $MANDIR/man7 $MANDIR/man8; do
13 if [ ! -d $d ]; then
14 mkdir $d
15 if [ ! -d $d ]; then
16 echo Failed to make directory $d, does $USER have privileges?
17 exit 1
20 done
22 for sect in 1 5 7 8 ; do
23 for m in $MANDIR/man$sect ; do
24 for s in $SRCDIR../docs/manpages/*$sect; do
25 FNAME=$m/`basename $s`
27 # Test for writability. Involves
28 # blowing away existing files.
30 if (rm -f $FNAME && touch $FNAME); then
31 rm $FNAME
32 if [ "x$GROFF" = x ] ; then
33 cp $s $m # Copy raw nroff
34 else
35 echo "\t$FNAME" # groff'ing can be slow, give the user
36 # a warm fuzzy.
37 $GROFF $s > $FNAME # Process nroff, because man(1) (on
38 # this system) doesn't .
40 chmod 0644 $FNAME
41 else
42 echo Cannot create $FNAME... does $USER have privileges?
44 done
45 done
46 done
48 cat << EOF
49 ======================================================================
50 The man pages have been installed. You may uninstall them using the command
51 the command "make uninstallman" or make "uninstall" to uninstall binaries,
52 man pages and shell scripts.
53 ======================================================================
54 EOF
56 exit 0