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: Date: Tue, 6 Jan 2009 20:05:39 -0500 From: "Jared Silva" 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 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <17f020130901040231o7844d628m9b71b6d09be0ee91 AT mail DOT gmail DOT com> <17f020130901060709v74c968b5g8ca938f5acaae757 AT mail DOT gmail DOT com> X-IsSubscribed: yes 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 $ 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/