diff --git a/scripts/eofnl b/scripts/eofnl index 004a0c029..bf87eebd2 100755 --- a/scripts/eofnl +++ b/scripts/eofnl @@ -23,4 +23,10 @@ if [[ ! $(tail -c2 "$f") ]]; then exit 1 fi +if grep -q $'\r' "$f"; then + echo "$f: DOS-style newlines" + dos2unix "$f" &> /dev/null + exit 1 +fi + exit 0