From 8fc1504ff8204dd1ca735f31c769f6dadf0f88cb Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Fri, 13 Nov 1998 21:41:01 +0000 Subject: 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. (This used to be commit 4c2b5a00983501e5d4aad1456ba8b5ab0dfd9b4c) --- source3/script/installman.sh | 24 +++++++++++++++++++++--- 1 file changed, 21 insertions(+), 3 deletions(-) (limited to 'source3/script/installman.sh') diff --git a/source3/script/installman.sh b/source3/script/installman.sh index ba78b56806..12e49fcda3 100755 --- a/source3/script/installman.sh +++ b/source3/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 -- cgit