[winGRASS] some really slooooowwww functions

Glynn Clements glynn.clements at virgin.net
Wed Jan 30 02:09:21 EST 2002


[CC to GRASS developers.]

Matt & Kim wrote:

> >> 1) When running many grass commands  instead of the expected
> >> output I get:
> >>         grass5.0.0pre2_i686-pc-cygwin_bin.tar.gz: No such file or directory
> ...
> >> For the above session a text file containing the expected
> >> output can be found in
> >> D:\cygwin\home\Obelix1\g-data\yk\landsat7\.tmp\OBELIX\1396.0
> >
> >This problem was reported several times lately. But i had no time to
> >look into this. It is a mystery to me, it works flawlessly on my machine
> >(W2K SP2, latest cygwin). 
> 
> I found the culprit by doing a full text search of all files in the cygwin 
> tree for the pre2 filename. It was found in /usr/bin/more:
> 
> 	#!/bin/sh
> 	/usr/bin/less -EFX grass5.0.0pre2_i686-pc-cygwin_bin.tar.gz
> 
> I don't know what this script is supposed to look like, but simply
> deleting the everything after the X seems to be a workable solution.

It's supposed to look like this:

	#!/bin/sh
	/usr/bin/less -EFX "$@"

The install script attempts to create a "more" program (Cygwin doesn't
have one), but the "$1" is being replaced by the argument to the
install script instead of being inserted literally.

The install script on the Baylor site[1] has:

# Need to link more to less for CYGWIN
if [ "$CYGWIN" ] ; then
   if [ ! -x /usr/bin/more ] ; then
      echo "#!/bin/sh" > /usr/bin/more
      echo "/usr/bin/less -EFX $@" >> /usr/bin/more
      chmod a+x /usr/bin/more
   fi
fi

The line:

      echo "/usr/bin/less -EFX $@" >> /usr/bin/more

should be:

      echo '/usr/bin/less -EFX $@' >> /usr/bin/more

Shell variables are substituted within double quotes, but not within
single quotes.

Also the Baylor site is out of date; the latest version is 5.0.0pre3,
but Baylor only has pre2 (and a broken install script).

Can whoever is responsible for the Baylor site at least fix the
install script.

[1] ftp://grass.baylor.edu/pub/grass/grass5/binary/windows_cygnus/grass5install.sh

-- 
Glynn Clements <glynn.clements at virgin.net>



More information about the grass-windows mailing list