Optimize bash Windows, force LF line endings

This commit is contained in:
Damien Guard 2016-05-16 13:01:10 -07:00
parent 0e5a4ffb6e
commit 26fcb03662
2 changed files with 7 additions and 4 deletions

3
.gitattributes vendored
View File

@ -12,3 +12,6 @@ spec/fixtures/css.css text eol=lf
spec/fixtures/sample.js text eol=lf
spec/fixtures/sample.less text eol=lf
spec/fixtures/sample.txt text eol=lf
# Windows bash scripts are also Unix LF endings
*.sh eol=lf

View File

@ -1,9 +1,9 @@
#!/bin/sh
pushd "$(dirname "$0")" > /dev/null
if command -v "cygpath" > /dev/null; then
ATOMCMD=""$(cygpath . -a -w)atom.cmd""
ATOMCMD=""$(cygpath "$(dirname "$0")" -a -w)\\atom.cmd""
else
pushd "$(dirname "$0")" > /dev/null
ATOMCMD=""$(pwd -W)/atom.cmd""
popd > /dev/null
fi
popd > /dev/null
cmd.exe //c "$ATOMCMD" "$@"
cmd.exe /C "$ATOMCMD" "$@"