fix_man now properly handles manpages with embedded spaces in the name
Symlinks are now retargetet. manpage RM moved to be pr. manpage, this fixes the race? condition I was seeing on Irix 5.3 with GNU rm.
This commit is contained in:
parent
d9cbdd0ca9
commit
c415821025
@ -50,6 +50,7 @@ SORT=/usr/bin/sort
|
|||||||
CUT=/usr/bin/cut
|
CUT=/usr/bin/cut
|
||||||
LS=/usr/bin/ls
|
LS=/usr/bin/ls
|
||||||
EXPR=/usr/bin/expr
|
EXPR=/usr/bin/expr
|
||||||
|
MV=/usr/bin/mv
|
||||||
|
|
||||||
# Groff stuff for manpages
|
# Groff stuff for manpages
|
||||||
NEQN=/usr/local/bin/neqn
|
NEQN=/usr/local/bin/neqn
|
||||||
@ -279,15 +280,22 @@ fix_man()
|
|||||||
do
|
do
|
||||||
if [ -d $i ]; then
|
if [ -d $i ]; then
|
||||||
catdir=cat${i##man}
|
catdir=cat${i##man}
|
||||||
mkdir $catdir
|
$MKDIR $catdir
|
||||||
cd $i
|
cd $i
|
||||||
for j in *
|
for manpage in *
|
||||||
do
|
do
|
||||||
$NEQN $NEQNOPTS $j | $TBL | $NROFF $NROFFOPTS > ../$catdir/$j
|
if [ -L "$manpage" ]; then
|
||||||
$GZIP ../$catdir/$j
|
TARGET=$($LS -l "$manpage" | $AWK '{ print $NF }')
|
||||||
|
ln -snf "$TARGET".gz "$manpage".gz
|
||||||
|
$MV "$manpage".gz "../$catdir"
|
||||||
|
$RM -f "$manpage"
|
||||||
|
else
|
||||||
|
$NEQN $NEQNOPTS "$manpage" | $TBL | $NROFF $NROFFOPTS > "../$catdir/$manpage"
|
||||||
|
$GZIP "../$catdir/$manpage"
|
||||||
|
$RM -f $manpage
|
||||||
|
fi
|
||||||
done
|
done
|
||||||
cd ..
|
cd ..
|
||||||
rm -rf $i/*
|
|
||||||
rmdir $i
|
rmdir $i
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
Loading…
x
Reference in New Issue
Block a user