summaryrefslogtreecommitdiff
path: root/source3/script
diff options
context:
space:
mode:
authorLars Müller <lmuelle@samba.org>2005-10-20 12:58:40 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 11:05:06 -0500
commit580ef1f81e8f8ee02a4300366029cedbac65413e (patch)
tree9dbce501cc81e5766cbdf16407b8fb62711ab40a /source3/script
parentad7cd4096f73382f3723fb3f4581c6cea4186702 (diff)
downloadsamba-580ef1f81e8f8ee02a4300366029cedbac65413e.tar.gz
samba-580ef1f81e8f8ee02a4300366029cedbac65413e.tar.bz2
samba-580ef1f81e8f8ee02a4300366029cedbac65413e.zip
r11224: Add feature to get our configuration from config.log into installman.sh.
This allows us to install for example smbsh.1 only if SMBWRAPPER is set. Removed also one rm call as we copy and do not append to the same file in the next step. There is no file permission risk as we chmod 0644 in any case later. Replaced one basename call by shell substitution. (This used to be commit 3944dfbff4f7f951d35e7893f7ab56ed2e9d76b0)
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..e9b068a9f6 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 config.log && \
+ eval $( grep "^[[:alnum:]]*=.*" 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