X-Spam-Check-By: sourceware.org Date: Wed, 10 Jan 2007 09:25:46 -0500 (EST) From: Igor Peshansky Reply-To: cygwin AT cygwin DOT com To: Andrew DeFaria cc: cygwin AT cygwin DOT com Subject: Re: activestate perl on cygwin In-Reply-To: Message-ID: References: <1168360081 DOT 45a3c291af993 AT easymail-old DOT hol DOT gr> <45A3C4D6 DOT F4A71EC7 AT dessent DOT net> <31b7d2790701090912t71c9c3f6v38f4a1141619ad24 AT mail DOT gmail DOT com> <003001c73461$788a7380$699f5a80$@rr.com> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com On Wed, 10 Jan 2007, Andrew DeFaria wrote: > I'm not sure I agree with your script's premise which states in the > comment "Cygwin passes 'cygwin style' paths to the program in the #! > statement". I don't believe that is true. Cygwin passes what you specify > at the command line. That part is actually correct. Save the following two files, add the directory where you saved test_script.wr to $PATH, and then invoke it by name to see what I mean. ----------- BEGIN /usr/local/bin/wraptest ----------- #!/bin/sh echo "$@" ------------ END /usr/local/bin/wraptest ------------ --------------- BEGIN test_script.wr ---------------- #!/usr/local/bin/wraptest Doesn't matter what you put here... ---------------- END test_script.wr ----------------- FWIW, for the past few years I've been using the following script to allow Windows programs in the shebang (#!) line: ------------- BEGIN /usr/local/bin/wrap ------------- #!/bin/sh pname="$1" fname="`cygpath -wi "$2"`" shift 2 && exec "$pname" "$fname" "$@" -------------- END /usr/local/bin/wrap -------------- A typical use would be as follows: #!/usr/local/bin/wrap /cygdrive/c/perl/perl which invokes ActiveState Perl with Win32 path to the current script and with the rest of the arguments intact. Igor -- http://cs.nyu.edu/~pechtcha/ |\ _,,,---,,_ pechtcha AT cs DOT nyu DOT edu | igor AT watson DOT ibm DOT com ZZZzz /,`.-'`' -. ;-;;,_ Igor Peshansky, Ph.D. (name changed!) |,4- ) )-,_. ,\ ( `'-' old name: Igor Pechtchanski '---''(_/--' `-'\_) fL a.k.a JaguaR-R-R-r-r-r-.-.-. Meow! Freedom is just another word for "nothing left to lose"... -- Janis Joplin -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/