delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2003/01/31/22:13:59

Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sources.redhat.com/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com
Message-ID: <3E3B3B6B.8020308@eCosCentric.com>
Date: Sat, 01 Feb 2003 03:13:47 +0000
From: Jonathan Larmour <jifl AT eCosCentric DOT com>
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-GB; rv:1.2) Gecko/20021203
X-Accept-Language: en-gb, en, en-us
MIME-Version: 1.0
To: cygwin AT cygwin DOT com
Subject: /usr/bin/tclsh84

Ah another day another tclsh.

Unfortunately there are those of us who like having scripts that are 
portable between OS's :-). On Linux at least, tclsh is installed as 
/usr/bin/tclsh with no version number suffix. Cygwin used tclsh83 and 
tclsh84 and will no doubt use tclsh85 when it comes out.

Why can't we just have a nice standard /usr/bin/tclsh that scripts can 
easily reference like other UNIX environments? Even if it's only a soft 
link to the most recently installed tclshNN (like RPM post-install scripts 
do for the linux kernel etc.). I know cygwin has got post-install scripts, 
so any reason not to?

Out of interest, this is the magic we've so far used to cope with name and 
path differences on cygwin, and we'd like it not to keep getting out of 
date. Or indeed our documentation - eCos users use cygwin because the 
tools require it, not because they want to understand the intricacies of 
finding the correct tcl version having never touched bash/cygwin before :-).

#!/bin/bash
# restart using a Tcl shell \
     exec sh -c 'for tclshell in tclsh tclsh83 cygtclsh80 ; do \
             ( echo | $tclshell ) 2> /dev/null && \
   exec $tclshell "`( cygpath -w \"$0\" ) 2> /dev/null || \
   echo $0`" "$@" ; \
         done ; \
         echo "Cannot find Tcl shell" ; exit 1' "$0" "$@"

The convolutions are to deal with spaces in path names, and this was 
recently fixed to cope with tclsh83 not liking cygwin style paths as $0, a 
regression from cygtclsh80 out of interest.

Jifl
-- 
eCosCentric       http://www.eCosCentric.com/       <info AT eCosCentric DOT com>
--[ "You can complain because roses have thorns, or you ]--
--[  can rejoice because thorns have roses." -Lincoln   ]-- Opinions==mine


--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Bug reporting:         http://cygwin.com/bugs.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019