error in utils/setup
Greg Koerper
greg at towhee.cor2.epa.gov
Wed May 12 16:33:21 EDT 1993
I tripped across the following error in the GRASS compilation setup routine
(grass4.1/src/CMD/utils/setup):
if test "$HASX" != "False"
then
if access r $XLIBPATH/$FINDXLIB
then
sh $udir/printf "%s\n\n" Found The X11 library -- $XLIBPATH
else
sh $udir/printf "%s\n" "I can't seem to find your X Library."
while true
do
sh $udir/printf %s "Path to your X Library [RETURN for none] -->"
read x
if test "$x" != ""
then
if access r $x/FINDXLIB
then
XLIBPATH=$x
sh $udir/printf "%s\n\n" Found it.
break
else
sh $udir/printf "%s\n" This is an invalid path. Try again.
fi
else
XLIBPATH=
break;
fi
done
fi
fi
Users should change 'access r $x/FINDXLIB' to 'access r $x/$FINDXLIB'.
To improve the code, I think that setup should echo the pathnames or files it
is testing. I have found myself having to more through the code (or is that
less) while I run setup in order to understand what the script is doing.
An echo would help to avoid the following example:
I can't find your Motif include path.
awk: cmd. line:1: (FILENAME=- FNR=1) warning: too many arguments supplied for format string
Path for Motif include files [RETURN for none] -->/files/data/towhee/data1/motif/include
Invalid path. Try again.
awk: cmd. line:1: (FILENAME=- FNR=1) warning: too many arguments supplied for format string
Path for Motif include files [RETURN for none] -->/files/data/towhee/data1/motif/include/Xm
Found it.
greg
******************************************************************************
Greg Koerper Internet: greg at heart.cor.epa.gov
ManTech Environmental Technology, Inc. UUCP: hplabs!hp-pcd!orstcs!koerper
US EPA Environmental Research Lab
200 SW 35th St., JSB
Corvallis, OR 97333 "The 90s will make the 60s look like the 50s.
(503) 754-4490 Just ask your kids."
fax: (503) 754-4338
******************************************************************************
More information about the grass-dev
mailing list