delorie.com/archives/browse.cgi | search |
X-Recipient: | archive-cygwin AT delorie DOT com |
DomainKey-Signature: | a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id |
:list-unsubscribe:list-subscribe:list-archive:list-post | |
:list-help:sender:date:from:reply-to:message-id:to:subject | |
:mime-version:content-type; q=dns; s=default; b=KdrNxVAbWudxqod2 | |
+WJ4C31j9qUTS7ZS4tScHGtGsrWme1ntU1cqny2jRWWsMymlil1KDL+4J4C9QnCI | |
FImCYv4tZzKA6ypv/jzy3JBW6WSMjzZSC8/ADB5O2xh9LhUlRJ33zEhfGjONzTfp | |
6N1C6XQ0XEbN7GoXtb4DfkAhoT8= | |
DKIM-Signature: | v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id |
:list-unsubscribe:list-subscribe:list-archive:list-post | |
:list-help:sender:date:from:reply-to:message-id:to:subject | |
:mime-version:content-type; s=default; bh=xc3KaEj6oI9Ig9mFEhSLbV | |
96P3s=; b=Lh9r0K/ESp5GsqrizUCTbGRb8cKzCKpaijXuLqlArnhp98E8cZiCMB | |
aSFNBSFBLVqink1eZpKr+9oyNc9l0QmvjJ6pKp2CIzw0ddR6YWHNGY7V7FErVJId | |
82/rskP5NR3LBiHKvDxvf1cyOJSQVZX35ZP5hjN22jg06iqRDSAWo= | |
Mailing-List: | contact cygwin-help AT cygwin DOT com; run by ezmlm |
List-Id: | <cygwin.cygwin.com> |
List-Subscribe: | <mailto:cygwin-subscribe AT cygwin DOT com> |
List-Archive: | <http://sourceware.org/ml/cygwin/> |
List-Post: | <mailto:cygwin AT cygwin DOT com> |
List-Help: | <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/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 |
Authentication-Results: | sourceware.org; auth=none |
X-Virus-Found: | No |
X-Spam-SWARE-Status: | No, score=-0.8 required=5.0 tests=AWL,BAYES_50,FREEMAIL_FROM,KAM_FROM_URIBL_PCCC,KAM_THEBAT,SPF_SOFTFAIL autolearn=no version=3.3.2 |
X-HELO: | smtp.ht-systems.ru |
Date: | Mon, 5 Jan 2015 05:10:11 +0300 |
From: | Andrey Repin <anrdaemon AT yandex DOT ru> |
Reply-To: | cygwin AT cygwin DOT com |
Message-ID: | <915724361.20150105051011@yandex.ru> |
To: | All <cygwin AT cygwin DOT com> |
Subject: | Cygwin script wrapper (native) |
MIME-Version: | 1.0 |
X-IsSubscribed: | yes |
------------0C911020D340BAEF7 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Greetings, All! I think I've finally ironed out most of the issues I had with it. (Infinite number of arguments, quoting, etc.) The only known issues that cause script to break seems to be the same as you would expect with direct script executions - uneven/misplaced quotation marks. How to use: Place the attached script as /bin/cygwrap.cmd (placement is important, as the script working out certain paths relative to its location). Run the script. Short notice should appear, mentioning usage and registration process. Run the script with "--install" option. By default, the script only register the ".sh" extension. You may list additional extensions after "--install", space-separated. F.e. cygwrap.cmd --install .pl .py Then try executing a simple test.sh[1] script with all kind of arguments and see if there's any significant discrepancy in what you pass to the script and what is actually interpreted from your input. Keep in mind, that "="(equality sign) is a parameter separator in CMD, and parameters containing it must be enclosed in double quotes. If you want to execute Cygwin scripts from native CMD scripts through this association, and/or use CMD completion/executable search functions, you will need to adjust your %PATHEXT% variable to include relevant extensions. F.e. PATHEXT=.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC;.BTM;.PHP;.SH If you are not happy with wrapper prepending Cygwin's bin directory to the %PATH%, i.e. if you already have your path set up to include Cygwin/bin, feel free to comment out the relevant line from the script. [1] #!/bin/sh -x echo "$PATH" echo $#: "$@" -- WBR, Andrey Repin Sorry for my terrible english... ------------0C911020D340BAEF7 Content-Type: text/plain; name="cygwrap.txt" Content-transfer-encoding: base64 Content-Disposition: attachment; filename="cygwrap.txt" QFNFVExPQ0FMIEVOQUJMRUVYVEVOU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QNCkVORExPQ0FMIDI+IE5VTDoNCg== ------------0C911020D340BAEF7 Content-Type: text/plain; charset=us-ascii -- Problem reports: http://cygwin.com/problems.html FAQ: http://cygwin.com/faq/ Documentation: http://cygwin.com/docs.html Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple ------------0C911020D340BAEF7--
webmaster | delorie software privacy |
Copyright © 2019 by DJ Delorie | Updated Jul 2019 |