From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 22154 invoked by alias); 6 Jan 2009 20:04:00 -0000 Received: (qmail 22135 invoked by uid 22791); 6 Jan 2009 20:03:55 -0000 X-SWARE-Spam-Status: No, hits=-2.6 required=5.0 tests=BAYES_00,SPF_PASS X-Spam-Check-By: sourceware.org Received: from mail-ew0-f20.google.com (HELO mail-ew0-f20.google.com) (209.85.219.20) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Tue, 06 Jan 2009 20:03:50 +0000 Received: by ewy13 with SMTP id 13so11076408ewy.6 for ; Tue, 06 Jan 2009 12:03:45 -0800 (PST) Received: by 10.210.10.1 with SMTP id 1mr6795868ebj.64.1231272225314; Tue, 06 Jan 2009 12:03:45 -0800 (PST) Received: from smtp.gmail.com ([93.84.55.151]) by mx.google.com with ESMTPS id 35sm68229328nfu.32.2009.01.06.12.03.44 (version=TLSv1/SSLv3 cipher=RC4-MD5); Tue, 06 Jan 2009 12:03:44 -0800 (PST) Date: Tue, 06 Jan 2009 20:04:00 -0000 From: Sergei Gavrikov To: Jonathan Larmour Cc: John Dallaway , ecos-devel@ecos.sourceware.org Subject: Re: #! magic for finding Cygwin Tcl shell Message-ID: <20090106200344.GA11182@ubuntu.local> References: <49639C9C.9040607@dallaway.org.uk> <4963A830.6090600@eCosCentric.com> <4963AD4C.9000704@dallaway.org.uk> <4963B2DC.2020606@eCosCentric.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4963B2DC.2020606@eCosCentric.com> User-Agent: Mutt/1.5.17+20080114 (2008-01-14) X-IsSubscribed: yes Mailing-List: contact ecos-devel-help@ecos.sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Post: List-Help: , Sender: ecos-devel-owner@ecos.sourceware.org X-SW-Source: 2009-01/txt/msg00011.txt.bz2 Jonathan Larmour wrote: > John Dallaway wrote: > > Hi Jifl > > > > Jonathan Larmour wrote: > > > >>> Rather than increase the complexity of the #! magic still further, I > >>> think it now makes sense to revert to a simple "#! /usr/bin/tclsh" > >>> within our Tcl scripts. However, this would break compatibility with old > >>> Cygwin installations providing only tclsh8*.exe or cygtclsh80.exe. > >>> > >>> Any objections? > >> Yes, it may not be in /usr/bin. I don't mind the cygwin-specific cygpath > >> bits being dropped, but I'd still want it to be found from the PATH by some > >> means. > > > > Have you ever encountered a Linux system where tclsh is not accessible > > at /usr/bin/tclsh? Or were you thinking of portability to other > > operating systems? > > Portability (or a linux system where tclsh was not installed by the system > owner - not everyone's environment is their own desktop). Command line > stuff needs to work more widely than Linux. tclsh in /usr/local/bin or the > user's home dir or ... > > > I note your (old) post to the Cygwin list which implies that > > /usr/bin/tclsh is usual for UNIX-like operating systems: > > > > http://cygwin.com/ml/cygwin/2003-02/msg00007.html > > That was specific to cygwin where they kept renaming the tclsh executable > for each version. Hi Richard Suchenwirth found that sha-bang #!/usr/bin/env tclsh also works (starts the first tclsh in PATH) quite nicely on his Linux, Solaris, and Cygwin installations - so he will use this instead of exec magic in the future. http://wiki.tcl.tk/812 ;# [exec magic] Sergei