Skip to content
Permalink
Browse files

Optimize bash Windows, force LF line endings

  • Loading branch information...
damieng committed May 16, 2016
1 parent 0e5a4ff commit 26fcb036625524bd52abd9d867095caf72da7961
Showing with 7 additions and 4 deletions.
  1. +3 −0 .gitattributes
  2. +4 −4 resources/win/atom.sh
@@ -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
@@ -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" "$@"

0 comments on commit 26fcb03

Please sign in to comment.
You can’t perform that action at this time.