Fixes problems with stubs on bash.

This commit is contained in:
Dominik Picheta 2014-12-26 01:02:45 +00:00
commit 06ccb851f8

View file

@ -531,7 +531,10 @@ proc installFromDir(dir: string, latest: bool, options: TOptions,
contents.add "chcp 65001\n" contents.add "chcp 65001\n"
contents.add "\"" & pkgDestDir / bin & "\" %*\n" contents.add "\"" & pkgDestDir / bin & "\" %*\n"
writeFile(dest, contents) writeFile(dest, contents)
writeFile(dest.changeFileExt(""), contents) # For Git bash. # For bash on Windows (Cygwin/Git bash).
let bashDest = dest.changeFileExt("")
echo("Creating Cygwin stub: ", pkgDestDir / bin, " -> ", bashDest)
writeFile(bashDest, "\"" & pkgDestDir / bin & "\" \"$@\"\n")
else: else:
{.error: "Sorry, your platform is not supported.".} {.error: "Sorry, your platform is not supported.".}
else: else: