summaryrefslogtreecommitdiff
path: root/source/script
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>1998-11-13 21:41:01 +0000
committerJeremy Allison <jra@samba.org>1998-11-13 21:41:01 +0000
commit4c2b5a00983501e5d4aad1456ba8b5ab0dfd9b4c (patch)
treef50b790798e338298a170bf40a92f90fe84a43d1 /source/script
parent24b2bf1741366045eca02cbd09e3283531d28422 (diff)
downloadsamba-4c2b5a00983501e5d4aad1456ba8b5ab0dfd9b4c.tar.gz
Makefile.in configure configure.in include/config.h.in: Changes for DGUX and UNIXWARE.
groupdb/aliasdb.c groupdb/aliasfile.c groupdb/groupfile.c: Don't use snprinf, use slprintf. include/includes.h: Fix YP problem. include/smb.h: Fix ZERO_STRUCTP. lib/util_sock.c: Added strerror() in debugs. passdb/ldap.c: Don't use snprinf, use slprintf. rpc_client/cli_lsarpc.c rpc_client/cli_pipe.c rpc_parse/parse_sec.c rpc_server/srv_pipe.c: Don't use snprinf, use slprintf. script/installman.sh: DGUX changes. smbd/open.c smbd/oplock.c: Fixed gcc warnings. web/swat.c: Changes USER to SWAT_USER.
Diffstat (limited to 'source/script')
-rwxr-xr-xsource/script/installman.sh24
1 files changed, 21 insertions, 3 deletions
diff --git a/source/script/installman.sh b/source/script/installman.sh
index ba78b568067..12e49fcda3f 100755
--- a/source/script/installman.sh
+++ b/source/script/installman.sh
@@ -3,6 +3,9 @@
MANDIR=$1
SRCDIR=$2/
+if [ $# -ge 3 ] ; then
+ GROFF=$3 # sh cmd line, including options
+fi
echo Installing man pages in $MANDIR
@@ -20,9 +23,24 @@ for sect in 1 5 7 8 ; do
for m in $MANDIR/man$sect ; do
for s in $SRCDIR../docs/manpages/*$sect; do
FNAME=$m/`basename $s`
- echo Installing $FNAME
- cp $s $m || echo Cannot create $FNAME... does $USER have privileges?
- chmod 0644 $FNAME
+
+ # Test for writability. Involves
+ # blowing away existing files.
+
+ if (rm -f $FNAME && touch $FNAME); then
+ rm $FNAME
+ if [ ! "$GROFF" ] ; then
+ cp $s $m # Copy raw nroff
+ else
+ echo "\t$FNAME" # groff'ing can be slow, give the user
+ # a warm fuzzy.
+ $GROFF $s > $FNAME # Process nroff, because man(1) (on
+ # this system) doesn't .
+ fi
+ chmod 0644 $FNAME
+ else
+ echo Cannot create $FNAME... does $USER have privileges?
+ fi
done
done
done