From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 9218 invoked by alias); 7 Jan 2009 01:05:48 -0000 Received: (qmail 9209 invoked by uid 22791); 7 Jan 2009 01:05:47 -0000 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 Received: from rv-out-0708.google.com (HELO rv-out-0708.google.com) (209.85.198.249) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Wed, 07 Jan 2009 01:05:41 +0000 Received: by rv-out-0708.google.com with SMTP id b17so8013394rvf.38 for ; Tue, 06 Jan 2009 17:05:39 -0800 (PST) Received: by 10.114.56.4 with SMTP id e4mr14898402waa.48.1231290339580; Tue, 06 Jan 2009 17:05:39 -0800 (PST) Received: by 10.115.47.12 with HTTP; Tue, 6 Jan 2009 17:05:39 -0800 (PST) Message-ID: Date: Wed, 07 Jan 2009 05:33:00 -0000 From: "Jared Silva" To: cygwin@cygwin.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@mail.gmail.com> <17f020130901060709v74c968b5g8ca938f5acaae757@mail.gmail.com> X-IsSubscribed: yes Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner@cygwin.com Mail-Followup-To: cygwin@cygwin.com X-SW-Source: 2009-01/txt/msg00142.txt.bz2 $ 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/