We don't need DIFF anymore.
Added new LN and PRINTF commands. Replaced ln with $LN Avoid namespace pollution in fix_man() by declaring all internal variables local.
This commit is contained in:
parent
b2d56995a0
commit
87ae9aa1ff
@ -59,8 +59,9 @@ UNIQ=/bin/uniq
|
|||||||
BASENAME=/bin/basename
|
BASENAME=/bin/basename
|
||||||
DIRNAME=/bin/dirname
|
DIRNAME=/bin/dirname
|
||||||
TR=/bin/tr
|
TR=/bin/tr
|
||||||
DIFF=/usr/local/bin/diff # *Must* support -u (like GNU Diff)
|
|
||||||
FILE=/usr/bin/file # Used by do_strip()
|
FILE=/usr/bin/file # Used by do_strip()
|
||||||
|
PRINTF="/usr/bin/printf"
|
||||||
|
LN=/usr/bin/ln
|
||||||
|
|
||||||
# Groff stuff for manpages
|
# Groff stuff for manpages
|
||||||
NEQN=/usr/local/bin/neqn
|
NEQN=/usr/local/bin/neqn
|
||||||
@ -347,6 +348,11 @@ do_strip()
|
|||||||
# Run from 'cwd' where 'cwd' contains manX subdirs
|
# Run from 'cwd' where 'cwd' contains manX subdirs
|
||||||
fix_man()
|
fix_man()
|
||||||
{
|
{
|
||||||
|
local i
|
||||||
|
local catdir
|
||||||
|
local manpage
|
||||||
|
local TARGET
|
||||||
|
|
||||||
echo "Formatting manpages"
|
echo "Formatting manpages"
|
||||||
for i in man?
|
for i in man?
|
||||||
do
|
do
|
||||||
@ -358,7 +364,7 @@ fix_man()
|
|||||||
do
|
do
|
||||||
if [ -L "$manpage" ]; then
|
if [ -L "$manpage" ]; then
|
||||||
TARGET=$($LS -l "$manpage" | $AWK '{ print $NF }')
|
TARGET=$($LS -l "$manpage" | $AWK '{ print $NF }')
|
||||||
ln -snf "$TARGET".gz "$manpage".gz
|
$LN -snf "$TARGET".gz "$manpage".gz
|
||||||
$MV "$manpage".gz "../$catdir"
|
$MV "$manpage".gz "../$catdir"
|
||||||
$RM -f "$manpage"
|
$RM -f "$manpage"
|
||||||
else
|
else
|
||||||
|
Loading…
x
Reference in New Issue
Block a user