[GRASS5] [bug #3800] (grass) script tests fail on some platforms

this bug's URL: http://intevation.de/rt/webrt?serial_num=3800
-------------------------------------------------------------------------

Subject: script tests fail on some platforms

see http://grass.itc.it/pipermail/grass5/2005-November/020021.html

this seems to fail on some platforms:

E00CONV="`which e00conv`"
if [ "$EOOCONV" == "" ] ; then
  echo error
  exit
fi

works:
  if [ -z "$E00CONV" ] ; then

probably also
  if [ "$VAR" != "" ] ; then

should be
  if [ -n "$VAR" ] ; then

affected modules:

$ grep -rI '""' scripts/* | cut -f1 -d/ | sort | uniq

d.correlate
d.monsize
d.out.file
d.out.png
d.rast.leg
d.resize
d.slide.show
d.split
d.vect.thematic
db.test
g.mlist
g.mremove
i.fusion.brovey
i.image.mosaic
i.in.spotvgt
i.oif
i.spectral
i.tasscap
r.fillnulls
r.in.aster
r.in.srtm
r.mapcalculator
r.plane
r.reclass.area
r.regression.line
r.shaded.relief
r.univar.sh
r3.mapcalculator
v.build.all
v.convert.all
v.db.addcol
v.db.addtable
v.db.droptable
v.db.reconnect.all
v.db.update
v.in.gns
v.in.mapgen
v.in.sites.all
v.rast.stats
v.univar.sh

Hamish

-------------------------------------------- Managed by Request Tracker

Request Tracker wrote:

this bug's URL: http://intevation.de/rt/webrt?serial_num=3800

Subject: script tests fail on some platforms

see http://grass.itc.it/pipermail/grass5/2005-November/020021.html

this seems to fail on some platforms:

E00CONV="`which e00conv`"
if [ "$EOOCONV" == "" ] ; then

"==" isn't valid expression syntax; it's just "=".

--
Glynn Clements <glynn@gclements.plus.com>

> this bug's URL: http://intevation.de/rt/webrt?serial_num=3800

> Subject: script tests fail on some platforms
>
> see http://grass.itc.it/pipermail/grass5/2005-November/020021.html
>
> this seems to fail on some platforms:
>
> E00CONV="`which e00conv`"
> if [ "$EOOCONV" == "" ] ; then

"==" isn't valid expression syntax; it's just "=".

sorry that was my mistake, the test that fails is in fact

> E00CONV=`which e00conv`
> if [ "$EOOCONV" = "" ] ; then

http://freegis.org/cgi-bin/viewcvs.cgi/grass6/scripts/v.in.e00/v.in.e00.diff?r1=1.11&r2=1.12

Maybe the error is

E00CONV=`which e00conv`

without quotes around "``" if there is spaces in the path? :confused: I don't
think so, but..

I don't know if this was on Mac or Cygwin & can't test.

Hamish