public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
From: "Jared Silva" <jayrod@gmail.com>
To: cygwin@cygwin.com
Subject: Re: Trick cmd.exe of Windows XP to run cygwin Batch Script.
Date: Wed, 07 Jan 2009 05:33:00 -0000	[thread overview]
Message-ID: <a34988160901061705q1a11b80fs85461b1b6310b541@mail.gmail.com> (raw)
In-Reply-To: <17f020130901060709v74c968b5g8ca938f5acaae757@mail.gmail.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/

  reply	other threads:[~2009-01-07  1:05 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-01-04 10:37 Hongyi Zhao
2009-01-04 11:07 ` Frank Fesevur
2009-01-04 13:09   ` Jeenu V
2009-01-05 11:27   ` Hongyi Zhao
2009-01-06 17:54     ` Frank Fesevur
2009-01-07  5:33       ` Jared Silva [this message]
2009-01-08 10:34       ` Hongyi Zhao
2009-01-04 17:10 ` Spiro Trikaliotis
2009-01-05 11:32   ` Hongyi Zhao
2009-01-05 16:34     ` Robert Pendell
2009-01-06 17:49       ` Hongyi Zhao
2009-01-05 12:43   ` Hongyi Zhao

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=a34988160901061705q1a11b80fs85461b1b6310b541@mail.gmail.com \
    --to=jayrod@gmail.com \
    --cc=cygwin@cygwin.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).