[GRASSLIST:3695] Re: [GRASS5] GRASS 5.7.0 beta5 - small change
Glynn Clements
glynn.clements at virgin.net
Thu Jun 17 09:48:18 EDT 2004
Radim Blazek wrote:
> > I see a small cosmetic error.
> >
> > Change in display/d.m/dm.tcl
> >
> > line 71
> > {command "About &System" {} "About System" {} -command { exec
> > $env(SHELL) $env(GISBASE)/etc/dm/tksys.tcl --tcltk} }
> >
> > changed
> > {command "About &System" {} "About System" {} -command { exec
> > $env(GISBASE)/etc/dm/tksys.tcl --tcltk} }
>
> I don't want to introduce more errors just now,
> this may be done after 5.7.0.
Actually, it isn't cosmetic, it's a bug fix. The existing version will
fail if $env(SHELL) refers to a C shell, as $@ isn't a valid variable
name in such shells.
tksys.tcl uses Bourne-shell syntax to re-execute itself using
$GRASS_WISH. If the script was executed directly, the #!/bin/sh line
will force it to be read by /bin/sh (which is guaranteed to be a
Bourne shell) regardless of the user's $SHELL setting.
OTOH, executing directly will fail if the script doesn't have the
executable bit set.
The command should just execute it via $GRASS_WISH directly, rather
than relying upon the "comment hack" to do so, i.e.:
exec $env(GRASS_WISH) $env(GISBASE)/etc/dm/tksys.tcl --tcltk
That doesn't depend upon either $SHELL being a Bourne shell or
tksys.tcl having the executable bit set.
--
Glynn Clements <glynn.clements at virgin.net>
More information about the grass-user
mailing list