[GRASS5] init.sh.new

Hi developers,

May I ask you to test src/general/init/init.sh.new?
This is another src/general/init/init.sh to search the latest version of tclsh
and wish, wish8.x as well as wish.

"wish" does not work at least on FreeBSD. And i've seen issues about this.
Using GRASS_TCLSH and GRASS_WISH, maybe this is solution for many tclsh and
wish scripts.

Yours,
Huidae Cho

----------------------------------------
If you want to unsubscribe from GRASS Development Team mailing list write to:
minordomo@geog.uni-hannover.de with
subject 'unsubscribe grass5'

Hi Huidae

GRASS wrote:

May I ask you to test src/general/init/init.sh.new?
This is another src/general/init/init.sh to search the latest version
of tclsh and wish, wish8.x as well as wish.

I disagree that we should be searching for the latest version based on
version numbers. It is difficult to come up with a script that will work
in all cases. We saw this with Markus's script and it appears that your
new script currently would not work if someone just installed Tcl/Tk
8.3.2 or Tcl/Tk 8.4a2 (both currently available from
http://dev.scriptics.com/). And if the developers of Tcl/Tk decide to
change their version system (they have changed it in the past - they
used to use a p to indicate patch level and the versions of Tcl and Tk
didn't match), we'll have to change our script again. In the end our
script becomes very complex just to find a version of Tcl/Tk. I'm sorry
but I see this as causing more problems than necessary.

I prefer simple solutions and your GRASS_TCLSH and GRASS_WISH
environment variables seem to me to be reasonable solutions. I plan to
print error messages if wish is not found that indicate that the user
should have the sysadmin create a link to the appropriate wish command
(this is the suggested method in the Tcl/Tk install instructions), or
alternatively use the environment variables you added.

"wish" does not work at least on FreeBSD. And i've seen issues about
this.

This seems strange. What is the reason why they do not create the link
to wish? How do their users deal with scripts they download that refer
to wish? Do they have to edit the scripts to get them to run? If this is
the case, then it seems very user-unfriendly to me. Strange.

Using GRASS_TCLSH and GRASS_WISH, maybe this is solution for
many tclsh and wish scripts.

Yes, as I said above, this is more reasonable to me.

Anyway, that is just my 2 cents worth.

--
Sincerely,

Jazzman (a.k.a. Justin Hickey) e-mail: jhickey@hpcc.nectec.or.th
High Performance Computing Center
National Electronics and Computer Technology Center (NECTEC)
Bangkok, Thailand

People who think they know everything are very irritating to those
of us who do. ---Anonymous

Jazz and Trek Rule!!!

----------------------------------------
If you want to unsubscribe from GRASS Development Team mailing list write to:
minordomo@geog.uni-hannover.de with
subject 'unsubscribe grass5'

From: Justin Hickey <jhickey@hpcc.nectec.or.th>

GRASS wrote:
> May I ask you to test src/general/init/init.sh.new?
> This is another src/general/init/init.sh to search the latest version
> of tclsh and wish, wish8.x as well as wish.

I disagree that we should be searching for the latest version based on
version numbers. It is difficult to come up with a script that will work
in all cases. We saw this with Markus's script and it appears that your
new script currently would not work if someone just installed Tcl/Tk
8.3.2 or Tcl/Tk 8.4a2 (both currently available from

I don't know why you pointed 8.3.2 or 8.4a2. Does init.sh.new work with
another version?

http://dev.scriptics.com/). And if the developers of Tcl/Tk decide to
change their version system (they have changed it in the past - they
used to use a p to indicate patch level and the versions of Tcl and Tk
didn't match), we'll have to change our script again. In the end our

Yes, I agree that the versions of Tcl and Tk can not match. In this case,
init.sh.new is useless :frowning:

script becomes very complex just to find a version of Tcl/Tk. I'm sorry
but I see this as causing more problems than necessary.

I prefer simple solutions and your GRASS_TCLSH and GRASS_WISH
environment variables seem to me to be reasonable solutions. I plan to
print error messages if wish is not found that indicate that the user
should have the sysadmin create a link to the appropriate wish command
(this is the suggested method in the Tcl/Tk install instructions), or
alternatively use the environment variables you added.

> "wish" does not work at least on FreeBSD. And i've seen issues about
> this.

This seems strange. What is the reason why they do not create the link
to wish? How do their users deal with scripts they download that refer
to wish? Do they have to edit the scripts to get them to run? If this is
the case, then it seems very user-unfriendly to me. Strange.

> Using GRASS_TCLSH and GRASS_WISH, maybe this is solution for
> many tclsh and wish scripts.

Yes, as I said above, this is more reasonable to me.

OK, we should change tcl/tk scripts to use GRASS_TCLSH and GRASS_WISH env
vars and add comments to SUBMITTING about this.

  exec tclsh "$0" "$@" => exec $GRASS_TCLSH "$0" "$@"
  exec wish "$0" "$@" => exec $GRASS_WISH "$0" "$@"

Do you agree with this?

Regards,
Huidae Cho

----------------------------------------
If you want to unsubscribe from GRASS Development Team mailing list write to:
minordomo@geog.uni-hannover.de with
subject 'unsubscribe grass5'

From: GRASS <grass@geni.knu.ac.kr>

OK, we should change tcl/tk scripts to use GRASS_TCLSH and GRASS_WISH env
vars and add comments to SUBMITTING about this.

  exec tclsh "$0" "$@" => exec $GRASS_TCLSH "$0" "$@"
  exec wish "$0" "$@" => exec $GRASS_WISH "$0" "$@"

Do you agree with this?

Hmm, it's somewhat strange. isn't it?

So, let users just use "alias". Then we don't need change anything. :slight_smile:

Huidae Cho

----------------------------------------
If you want to unsubscribe from GRASS Development Team mailing list write to:
minordomo@geog.uni-hannover.de with
subject 'unsubscribe grass5'

Hi Huidae

GRASS wrote:

I don't know why you pointed 8.3.2 or 8.4a2. Does init.sh.new work
with another version?

I didn't check carefully (that's why I said it appeared to do this) but
my first glance at your script seemed to me that it detected things like
wish followed by a digit followed by . followed by a digit. This does
not match 8.3.2 or 8.4a2. If your script does match these then please
accept my apologies. It was my fault for not carefully looking at the
code. Regardless, my point was that it is difficult to match version
numbers since they can change format at the discretion of the
developers. In fact, I am totally lost for an explanation of why Tcl/Tk
does not install to just tclsh and wish.

OK, we should change tcl/tk scripts to use GRASS_TCLSH and GRASS_WISH > env vars and add comments to SUBMITTING about this.

        exec tclsh "$0" "$@" => exec $GRASS_TCLSH "$0" "$@"
        exec wish "$0" "$@" => exec $GRASS_WISH "$0" "$@"

Do you agree with this?

From your other post:
Hmm, it's somewhat strange. isn't it?

So, let users just use "alias". Then we don't need change anything.

Ahh yes, alias seems fine to me. I will include it in the error message.
Thanks for your input!

--
Sincerely,

Jazzman (a.k.a. Justin Hickey) e-mail: jhickey@hpcc.nectec.or.th
High Performance Computing Center
National Electronics and Computer Technology Center (NECTEC)
Bangkok, Thailand

People who think they know everything are very irritating to those
of us who do. ---Anonymous

Jazz and Trek Rule!!!

----------------------------------------
If you want to unsubscribe from GRASS Development Team mailing list write to:
minordomo@geog.uni-hannover.de with
subject 'unsubscribe grass5'

From: Justin Hickey <jhickey@hpcc.nectec.or.th>

GRASS wrote:
> I don't know why you pointed 8.3.2 or 8.4a2. Does init.sh.new work
> with another version?

I didn't check carefully (that's why I said it appeared to do this) but
my first glance at your script seemed to me that it detected things like
wish followed by a digit followed by . followed by a digit. This does
not match 8.3.2 or 8.4a2. If your script does match these then please

Oops! I got it. Yes, my script won't work at all with these. :frowning:

accept my apologies. It was my fault for not carefully looking at the
code. Regardless, my point was that it is difficult to match version
numbers since they can change format at the discretion of the
developers. In fact, I am totally lost for an explanation of why Tcl/Tk
does not install to just tclsh and wish.

Most of OS's which use non-standard names want to use various versions of
Tcl/Tk depending on so many scripts.

> OK, we should change tcl/tk scripts to use GRASS_TCLSH and GRASS_WISH > env vars and add comments to SUBMITTING about this.
>
> exec tclsh "$0" "$@" => exec $GRASS_TCLSH "$0" "$@"
> exec wish "$0" "$@" => exec $GRASS_WISH "$0" "$@"
>
> Do you agree with this?

>From your other post:
> Hmm, it's somewhat strange. isn't it?
>
> So, let users just use "alias". Then we don't need change anything.

Ahh yes, alias seems fine to me. I will include it in the error message.
Thanks for your input!

An aliased command can not be found using current code :frowning:
I just applied GRASS_TCLSH and GRASS_WISH vars.

Yours,
Huidae Cho

----------------------------------------
If you want to unsubscribe from GRASS Development Team mailing list write to:
minordomo@geog.uni-hannover.de with
subject 'unsubscribe grass5'