summaryrefslogtreecommitdiff
path: root/source3/script
diff options
context:
space:
mode:
authorLars Müller <lmuelle@samba.org>2005-11-14 21:18:09 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 11:05:25 -0500
commitba2edc38aa6bce492817b395f196d3d2f2f0bda9 (patch)
treef3a063f0bad729c178d0e66ab609bcf27f253700 /source3/script
parent56f6b5d8d1dd0d1b43426c48998a97cbc27c825a (diff)
downloadsamba-ba2edc38aa6bce492817b395f196d3d2f2f0bda9.tar.gz
samba-ba2edc38aa6bce492817b395f196d3d2f2f0bda9.tar.bz2
samba-ba2edc38aa6bce492817b395f196d3d2f2f0bda9.zip
r11728: Ensure to check for the config.log in ${SRCDIR}.
Revert jerry's revert from 11685. :) At the moment I don't see a way to check if there is an empty ${SMBWRAPPER} or none. If there is a way to check if ${SMBWRAPPER} isn't set at all we could make the installman script even work if config.log does not exist. (This used to be commit 3e3113a1fab282c0f652340d1027bb614ef93ec3)
Diffstat (limited to 'source3/script')
-rwxr-xr-xsource3/script/installman.sh17
1 files changed, 14 insertions, 3 deletions
diff --git a/source3/script/installman.sh b/source3/script/installman.sh
index 6278012635..3bbca1a8aa 100755
--- a/source3/script/installman.sh
+++ b/source3/script/installman.sh
@@ -18,6 +18,10 @@ if test ! -d $SRCDIR../docs/manpages; then
exit 0
fi
+# Get the configured feature set
+test -f "${SRCDIR}/config.log" && \
+ eval $( grep "^[[:alnum:]]*=.*" "${SRCDIR}/config.log")
+
for lang in $langs; do
if [ "X$lang" = XC ]; then
echo Installing default man pages in $MANDIR/
@@ -40,13 +44,20 @@ for lang in $langs; do
for sect in 1 5 7 8 ; do
for m in $langdir/man$sect ; do
for s in $SRCDIR../docs/manpages/$lang/*$sect; do
- FNAME=$m/`basename $s`
-
+ MP_BASENAME=${s##*/}
+
+ # Check if this man page if required by the configured feature set
+ case "${MP_BASENAME}" in
+ smbsh.1) test -z "${SMBWRAPPER}" && continue ;;
+ *) ;;
+ esac
+
+ FNAME="$m/${MP_BASENAME}"
+
# Test for writability. Involves
# blowing away existing files.
if (rm -f $FNAME && touch $FNAME); then
- rm $FNAME
if [ "x$GROFF" = x ] ; then
cp $s $m # Copy raw nroff
else