[GRASS-dev] Re: [GRASS5] [bug #4331] (grass) delete if file exist - flag

Glynn Clements glynn at gclements.plus.com
Wed May 10 19:10:07 EDT 2006


Hamish wrote:

> > G_parser now sets, but doesn't export, the OVERWRITE environment
> > variable.
> 
> For consistency with other g.parser set vars shouldn't it be
> GIS_OVERWRITE?  ($GIS_OPT_  $GIS_FLAG_)

It isn't quite the same thing; $GIS_{OPT,FLAG}_* are purely for
communication between g.parser and the script, while [GRASS_]OVERWRITE
is meant to be propagated down into the commands which the script
runs.

[The GIS_{OPT,FLAG}_* variables will also be propagated, but that's an
unintentional side-effect of using environment variables. With
[GRASS_]OVERWRITE, it's intentional.]

> Does the new fn check G__getenv() for OVERWRITE=1 and if found set the
> enviro var even if --o wasn't given? Redundant for the modules, but not
> for example the r.blend $.r $.g $.b check.
> ?

It should do now; see Cedric's follow-up.

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




More information about the grass-dev mailing list