titoxd / wptc-track

WikiProject Tropical Cyclones' track map generator -- see http://en.wikipedia.org/wiki/WP:WPTC/M
22 stars 27 forks source link

Force LF for Cygwin users #8

Closed ChlodAlejandro closed 3 years ago

ChlodAlejandro commented 3 years ago

Cygwin users with a local .gitconfig file on their home (~) directory (equivalent to C:\Users\<user>\) will clone the repository with CRLF line endings if core.autocrlf was set to true. This can make autogen.sh fail to run when running through cygwin with the following error:

./autogen.sh: line 5: $'\r': command not found
./autogen.sh: line 7: $'\r': command not found
./autogen.sh: line 22: syntax error near unexpected token `$'\r''
'/autogen.sh: line 22: `version_check()

This pull request fixes the issue by introducing a .gitattributes file that forces LF line endings for .sh files. This can be later modified to include more files, but so far only has .sh files since gcc and perl should both automatically handle CRLF file endings.

ChlodAlejandro commented 3 years ago

(Two force pushes were made since I accidentally pushed the changes from #9 to the master branch of my fork.)

titoxd commented 3 years ago

Merged to main branch