git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: MinGW binary installer available

From
Johannes Sixt <j.sixt@eudaptics.com>
Date
Feb 8, 2007, 08:09 UTC
Message-ID
<45CADAAA.74058D21@eudaptics.com>
In-Reply-To
<45C9EB54.3040406@xs4all.nl>
Han-Wen Nienhuys wrote:
> Indeed: for now, this is intended for people clueful enough to install
> bash and perl on their own.  Adding bash itself should be easy, but
> I have no idea how to make cmd open the scripts with bash automatically.

I've thought about renaming git-commit to git-commit.cmd and add this preamble:

@echo off rem () { :; } ; : \ sh %0 %1 %2 %3 %4 %5 %6 %7 %8 %9 rem ; : \ exit /B %ERRORLEVEL%

in place of the usual "#!/bin/sh". It requires you to have a command named @echo.exe in the path that is a noop. Also, it is limited to 9 command line arguments.

What a hack! (*)
-- Hannes
(*) Here's how it works:
- cmd.exe will ignore all but the sh and exit lines, effectively
invoking the script under bash and exiting with bash's exit code.
- Bash will execute @echo, define a function named rem, ignore the sh
and exit lines because they are continuations of the : noop on the
previous line. It will also run the second rem, but it is a noop, too.
Previous: Johannes SixtNext: Han-Wen Nienhuys
Message 15 of 28 in “MinGW binary installer available”
  1. Han-Wen NienhuysFeb 7, 2007
  2. Johannes SchindelinFeb 7, 2007
  3. Johannes SchindelinFeb 7, 2007
  4. Han-Wen NienhuysFeb 7, 2007
  5. Johannes SixtFeb 8, 2007
  6. Han-Wen NienhuysFeb 7, 2007
  7. Johannes SchindelinFeb 7, 2007
  8. Han-Wen NienhuysFeb 7, 2007
  9. Johannes SchindelinFeb 7, 2007
  10. Han-Wen NienhuysFeb 7, 2007
  11. Johannes SchindelinFeb 7, 2007
  12. Han-Wen NienhuysFeb 7, 2007
  13. Han-Wen NienhuysFeb 7, 2007
  14. Johannes SixtFeb 8, 2007
  15. Johannes SixtFeb 8, 2007
  16. Han-Wen NienhuysFeb 8, 2007
  17. Robin RosenbergFeb 8, 2007
  18. Johannes SchindelinFeb 8, 2007
  19. Shawn O. PearceFeb 8, 2007
  20. Johannes SchindelinFeb 8, 2007
  21. Han-Wen NienhuysFeb 7, 2007
  22. Jan NieuwenhuizenFeb 7, 2007
  23. Han-Wen NienhuysFeb 7, 2007
  24. Johannes SchindelinFeb 7, 2007
  25. Han-Wen NienhuysFeb 7, 2007
  26. Johannes SchindelinFeb 7, 2007
  27. Jan NieuwenhuizenFeb 8, 2007
  28. Johannes SchindelinFeb 8, 2007

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.