I\'m trying to compile the NIST Biometric Image Software, and I have been having trouble all day. I finally got the source checked out right, and I installed cygwin with no
Windows uses two characters (CR and LF, or \r\n
) to mark the end of a line in a text file. Unix, Linux, and (by default) Cygwin use a single LF or '\n' character. Some Cygwin tools are able to deal with either format, but sh typically can't.
It looks like setup.sh
uses Windows-style line endings -- or at least line 94 does.
I didn't find the download for the sources, but if they're distributed as a zip file, you might need to extract them using the Cygwin unzip
command with the -a
option, so any line endings are automatically converted.
But I suspect there's more to it than that. The distributed setup.sh
file shouldn't have had any Windows-style line endings in the first place, and if it did, I don't know why the problem wouldn't show up until line 94.
If you can post the URL for the source download, I'll take a look at setup.exe
.
In pycharm you can quickly change the line endings by clicking on the letters CRLF
at the bottom right of the screen and selecting LF
.
run
sed -i 's/\r//' setup.sh
to fix your line endings
Easy way to convert example.sh file to unix is use NotePad++ (Edit>EOL Conversion>UNIX/OSX Format)
You can also set the default EOL in notepad++ (Settings>Preferences>New Document/Default Directory>select Unix/OSX under the Format box)
That's a symptom of line-ending mismatch.
To convert setup.sh
to Unix line endings on Cygwin, use
dos2unix setup.sh