Skip to content

Commit

Permalink
Optimize bash Windows, force LF line endings
Browse files Browse the repository at this point in the history
  • Loading branch information
damieng committed May 16, 2016
1 parent 0e5a4ff commit 26fcb03
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
3 changes: 3 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
Expand Up @@ -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
8 changes: 4 additions & 4 deletions resources/win/atom.sh
Original file line number Diff line number Diff line change
@@ -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.