[GRASS-dev] [bug #4617] (grass) Error in startup script: missing close-brace

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

Subject: Error in startup script: missing close-brace

Platform: GNU/Linux/x86 - Ubuntu 6
grass obtained from: CVS
grass binary for platform: Compiled from Sources
GRASS Version: CVS today

After updating out of cvs, the startup script failed as attached.

Welcome to GRASS 6.1.cvs (2006)
GRASS homepage: http://grass.itc.it/
This version running thru: Bash Shell (/bin/bash)
Help is available with the command: g.manual -i
See the licence terms with: g.version -c
If required, restart the graphical user interface with: gis.m &
When ready to quit enter: exit
Error in startup script: missing close-brace
    while executing
"proc GuiMenu::tree {} {

        # Tear off menus (yes / no)
        global tmenu
        # Key to use for control (for menu accelerators)
        global keyctrl
        # The environme..."
    (file "/usr/local/grass-6.1.cvs/etc/gui/menus/menu.tcl" line 26)
    invoked from within
"source "$env(GISBASE)/etc/gui/menus/menu.tcl""
    (file "/usr/local/grass-6.1.cvs/etc/gm/gmmenu.tcl" line 13)
    invoked from within
"source $gmpath/gmmenu.tcl"
    (procedure "Gm::create" line 25)
    invoked from within
"Gm::create"
    (procedure "main" line 29)
    invoked from within
"main $argc $argv"
    (file "/usr/local/grass-6.1.cvs/etc/gm/gm.tcl" line 518)
bash: setenv: command not found
GRASS 6.1.cvs (k200):/gd >

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

On Sat, Jun 17, 2006 at 07:44:14AM +0200, Request Tracker wrote:

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

Subject: Error in startup script: missing close-brace

...

bash: setenv: command not found

...this doesn't look good to me...

Markus

Am Samstag, den 17.06.2006, 15:09 +0200 schrieb Markus Neteler:

> bash: setenv: command not found

...this doesn't look good to me...

Markus

reported bug 4617 is gone with fixing 4619, but it looks like setenv is
not available in a standard ubuntu installation(?)

when calling tcsh, I have setenv. Starting grass out of tcsh invokes sh,
which is again free of setenv...

Is this a matter of system setup?

/Stefan

Stefan Paulick wrote:

> > bash: setenv: command not found
>
> ...this doesn't look good to me...
>
> Markus

reported bug 4617 is gone with fixing 4619, but it looks like setenv is
not available in a standard ubuntu installation(?)

when calling tcsh, I have setenv. Starting grass out of tcsh invokes sh,
which is again free of setenv...

Is this a matter of system setup?

"setenv" is a csh built-in command; you can't use it in Bourne-shell
scripts.

The Bourne-shell equivalent is:

  var=value
  export var

[bash allows the above to be reduced to "export var=value", but that
isn't portable.]

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

Glynn Clements wrote:

"setenv" is a csh built-in command; you can't use it in Bourne-shell
scripts.

The Bourne-shell equivalent is:

  var=value
  export var

[bash allows the above to be reduced to "export var=value", but that
isn't portable.]

$ grep -rI export scripts/* | grep '=' | wc -l
77

$ grep -rI 'bin/bash' scripts/*
scripts/r.mapcalculator/r.mapcalculator:#!/bin/bash
scripts/r3.mapcalculator/r3.mapcalculator:#!/bin/bash

we have some work to do then.... :-/

Hamish

Hamish wrote:

$ grep -rI 'bin/bash' scripts/*
scripts/r.mapcalculator/r.mapcalculator:#!/bin/bash
scripts/r3.mapcalculator/r3.mapcalculator:#!/bin/bash

Even if bash is installed on a system, there's no guarantee that it's
installed in /bin. On commercial Unices, it's quite likely to be in
/usr/local/bin if it's present at all.

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