delorie.com/archives/browse.cgi | search |
X-Recipient: | archive-cygwin AT delorie DOT com |
X-SWARE-Spam-Status: | No, hits=-2.0 required=5.0 tests=BAYES_00,SARE_MSGID_LONG40,SPF_PASS |
X-Spam-Check-By: | sourceware.org |
Message-ID: | <a34988160901061705q1a11b80fs85461b1b6310b541@mail.gmail.com> |
Date: | Tue, 6 Jan 2009 20:05:39 -0500 |
From: | "Jared Silva" <jayrod AT gmail DOT com> |
To: | cygwin AT cygwin DOT com |
Subject: | Re: Trick cmd.exe of Windows XP to run cygwin Batch Script. |
In-Reply-To: | <17f020130901060709v74c968b5g8ca938f5acaae757@mail.gmail.com> |
MIME-Version: | 1.0 |
References: | <r531m49nvsu311asr3g18jk74m5l104lch AT 4ax DOT com> <17f020130901040231o7844d628m9b71b6d09be0ee91 AT mail DOT gmail DOT com> <u0o3m4hnm3bbddg8fan6uk41lh13inukeu AT 4ax DOT com> <17f020130901060709v74c968b5g8ca938f5acaae757 AT mail DOT gmail DOT com> |
X-IsSubscribed: | yes |
Mailing-List: | contact cygwin-help AT cygwin DOT com; run by ezmlm |
List-Id: | <cygwin.cygwin.com> |
List-Unsubscribe: | <mailto:cygwin-unsubscribe-archive-cygwin=delorie DOT com AT cygwin DOT 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 |
$ cat post-commit.bat SET BIN=D:\UNIX\cygwin\bin SET DPN_TMP=%TMP%\%~nx0 "%BIN%\cygpath.exe" -au "%~dpn0" > "%DPN_TMP%" SET /P DPN= < "%DPN_TMP%" DEL "%DPN_TMP%" "%BIN%\bash.exe" "%DPN%.sh" %* >> "%~dpn0.log" 2>&1 The above BAT file will run post-commit.sh (because the name of the BAT file is post-commit.bat) and write standard output and standard error to post-commit.log. I do not have time to explain all of the details, but the two links below will help clarify the Windows side of things. http://www.ss64.com/nt/syntax-args.html http://www.ss64.com/nt/set.html -- 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/
webmaster | delorie software privacy |
Copyright © 2019 by DJ Delorie | Updated Jul 2019 |