2 #5 July 96 Dan.Shearer@unisa.edu.au removed hardcoded values
4 # 13 Aug 2001 Rafal Szczesniak <mimir@spin.ict.pwr.wroc.pl>
5 # modified to accomodate international man pages (inspired
6 # by Japanese edition's approach)
8 MANDIR
=`echo $1 | sed 's/\/\//\//g'`
12 if [ $# -ge 4 ] ; then
13 GROFF
=$4 # sh cmd line, including options
16 if test ! -d $SRCDIR..
/bin
/docs
/manpages
; then
17 echo "No manpages present. Development version maybe?"
21 # Get the configured feature set
22 test -f "${SRCDIR}/config.log" && \
23 eval `grep "^[[:alnum:]]*=.*" "${SRCDIR}/config.log" |
24 grep -v ^MANDIR | grep -v ^SRCDIR`
26 for lang
in $langs; do
27 if [ "X$lang" = XC
]; then
28 echo Installing default man pages
in $MANDIR/
31 echo Installing
\"$lang\" man pages
in $MANDIR/lang
/$lang
35 for d
in $MANDIR $langdir $langdir/man1
$langdir/man5
$langdir/man7
$langdir/man8
; do
39 echo Failed to
make directory
$d, does
$USER have privileges?
45 for sect
in 1 5 7 8 ; do
46 for m
in $langdir/man
$sect ; do
47 for s
in $SRCDIR..
/bin
/docs
/manpages
/$lang/*$sect; do
48 MP_BASENAME
=`basename $s`
50 # Check if this man page if required by the configured feature set
51 case "${MP_BASENAME}" in
52 smbsh
.1) test -z "${SMBWRAPPER}" && continue ;;
56 FNAME
="$m/${MP_BASENAME}"
58 # Test for writability. Involves
59 # blowing away existing files.
61 if (rm -f $FNAME && touch $FNAME); then
62 if [ "x$GROFF" = x
] ; then
63 cp $s $m # Copy raw nroff
65 echo "\t$FNAME" # groff'ing can be slow, give the user
67 $GROFF $s > $FNAME # Process nroff, because man(1) (on
68 # this system) doesn't .
72 echo Cannot create
$FNAME... does
$USER have privileges?
79 ======================================================================
80 The man pages have been installed. You may uninstall them using the command
81 the command "make uninstallman" or make "uninstall" to uninstall binaries,
82 man pages and shell scripts.
83 ======================================================================