[GRASS-dev] [bug #4368] (grass) g.parser: pass through --o

Jachym Cepicky jachym.cepicky at centrum.cz
Sat May 13 13:00:54 EDT 2006


Dear developers,
usually, I do not say anything, when you are tallking about ways and
strategies conserning general GRASS development. Now I would like to add
my two cents:

In the "Art of Unix programing" Eric Raymond describes common ways, how flags and
parameters are organized in Unix.

In general, there are two main groups: "X-way" and the "GNU-way". The
"X" programs are using one "-" for both, flags and parameters. The
"flags" can have and usually do have more than one character. Example:

    xclock -analog -fg black
    
Beyond GNU-programs usually have one character flags with one "-" and
character strings, quoted by two "--". Exapmle:

    fetchmal -q --logfile mylog

GRASS could not be subsumed  in any of these groups, there was the
clear "GRASS-way", how things were organized, which was consistent: Flags
"-o", parameters "map=raster".

When I compiled after longer time GRASS again, I saw, that it was not
consistent any more. There is new flag, which does something, what was
solved IMHO better by the environment variable. To me looks new
"--o" flag strange. It does not fill GRASS's concept. IF so, there
should be single "-o" flag for *all* (suggested) modules - it would be more work,
but it would be IMHO more clean, than this workaround. What more, it
does not fill in any of the two groups mentioned by Eric Raymond.

I do not understand, why it was not possible simple to export "somehow"
the environment variable -> I believe you, there was no way, how to make
suggested scripts to work with this variable. But this solution comes as
"the worst from all good solutions" to me.

My apologize, if I hurt  anybody on the list, I did not mean
to.

Jachym


On Tue, May 09, 2006 at 09:36:01PM +0200, Cedric Shock via RT wrote:
> parser.c now sets the OVERWRITE environment variable, but doesn't export it.
> Scripts run by g.parser now have it set so that modules they run will be run
> as if --o was included. It can be used here to skip the overwrite check that's
> implemented in r.blend to check for .r .g and .b extensions to the map name.
> 
> -------------------------------------------- Managed by Request Tracker
> 
> _______________________________________________
> grass-dev mailing list
> grass-dev at grass.itc.it
> http://grass.itc.it/mailman/listinfo/grass-dev

-- 
Jachym Cepicky
e-mail: jachym.cepicky at centrum.cz
URL: http://les-ejk.cz
GPG: http://les-ejk.cz/gnupg_public_key/jachym_cepicky-gpg_public_key.asc
-----------------------------------------   
OFFICE:                                     
GDF-Hannover
Mengendamm 16d
30177 Hannover
Germany
e-mail: cepicky at gdf-hannover.de
URL:    http://gdf-hannover.de
Tel.:   +49 511-39088507
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
Url : http://lists.osgeo.org/pipermail/grass-dev/attachments/20060513/666db855/attachment.bin


More information about the grass-dev mailing list