From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 16165 invoked by alias); 6 Jan 2009 19:10:39 -0000 Received: (qmail 16155 invoked by uid 22791); 6 Jan 2009 19:10:39 -0000 X-SWARE-Spam-Status: No, hits=0.6 required=5.0 tests=BAYES_50,J_CHICKENPOX_73 X-Spam-Check-By: sourceware.org Received: from 137-67-76-76-skybeam.com (HELO mail.chez-thomas.org) (76.76.67.137) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Tue, 06 Jan 2009 19:10:33 +0000 Received: by mail.chez-thomas.org (Postfix, from userid 999) id 21F203B52AAC; Tue, 6 Jan 2009 12:10:16 -0700 (MST) Received: from hermes.chez-thomas.org (hermes_local [192.168.1.101]) by mail.chez-thomas.org (Postfix) with ESMTP id D41503B52614; Tue, 6 Jan 2009 12:10:15 -0700 (MST) Message-ID: <4963AC97.4070405@mlbassoc.com> Date: Tue, 06 Jan 2009 19:10:00 -0000 From: Gary Thomas User-Agent: Thunderbird 2.0.0.18 (X11/20081119) MIME-Version: 1.0 To: Jonathan Larmour CC: John Dallaway , ecos-devel@ecos.sourceware.org Subject: Re: #! magic for finding Cygwin Tcl shell References: <49639C9C.9040607@dallaway.org.uk> <4963A830.6090600@eCosCentric.com> In-Reply-To: <4963A830.6090600@eCosCentric.com> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit 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/msg00006.txt.bz2 Jonathan Larmour wrote: > John Dallaway wrote: >> I was looking at support for UNC file paths in the eCos Configuration >> Tool today. The convoluted #! magic we use in our Tcl scripts to find a >> Cygwin Tcl shell is getting in the way when calling (eg) heapgen.tcl via >> a UNC repository path. This code is only needed to support installations >> of Cygwin that are more than 5 years old. >> >> 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. Does CygWin have '/usr/bin/env'? This is the "modern" way to handle this: #! /usr/bin/env tclsh ... -- ------------------------------------------------------------ Gary Thomas | Consulting for the MLB Associates | Embedded world ------------------------------------------------------------