[GRASS-dev] how to check for system in TclTk

William Kyngesburye woklist at kyngchaos.com
Thu May 10 20:25:14 EDT 2007

So, without uname, is there another reliable way on the command line/ 
in a shell script, not in Tcl?

I worked a way to get grass-xterm-wrapper to work with the OSX  
Terminal.app instead of X11 xterm, but I use uname to check the  
system so OSX defaults to Terminal.app.  It'll still work without  
that bit, but GRASS_XTERM would need to be explicitly set - no big  
deal, I can move the default to the OSX startup or init.sh.

On May 6, 2007, at 3:31 PM, Michael Barton wrote:

> Glynn,
> Paul Kelly sent me this great-sounding tip as a way to get system
> information without invoking the Unix command uname, which is  
> unavailable
> under windows.
>> Usually I did platform checking in Tcl by looking for environment
>> variables that were platform-specific, e.g. something like:
>> if {[info exists env(OS)] && $env(OS) == "Windows_NT"}
>> but I see in the new d.rast.edit Glynn has used some kind of Tcl  
>> variable
>> which looks like an even neater way of doing it:
>> if {$tcl_platform(platform) == "windows"}

William Kyngesburye <kyngchaos*at*kyngchaos*dot*com>

"I ache, therefore I am.  Or in my case - I am, therefore I ache."

- Marvin

More information about the grass-dev mailing list