I am trying to build mono on windows, but the .sh files give errors about the carriage returns :
$ ./autogen.sh --host=i686-pc-mingw32 --profile=/usr/opt
./autogen.sh: line 4: $'\r': command not found
./autogen.sh: line 6: $'\r': command not found
./autogen.sh: line 9: $'\r': command not found
The .gitattributes file has this line({cr:
*.sh crlf
I can edit and remove the cr, but then when I try to do a reset so that it will blow away the local file and reget the file from origin, the gitattributes are also blown away:
git fetch origin master
git reset --hard FETCH_HEAD
Looking at the mono repository, they have the .gitattributes like this, but none of the build instructions addresses this issue.
What is the proper way to deal with line endings when building mono on windows? Surely I'm not supposed to manually run dos2unix after everytime I pull?