2016-11-03 22:33:17 +01:00
|
|
|
#!/bin/sh
|
|
|
|
|
2016-11-08 01:46:33 +01:00
|
|
|
grep -rIPl '\r' . \
|
2016-11-03 22:33:17 +01:00
|
|
|
--exclude-dir .git \
|
2016-11-08 01:46:33 +01:00
|
|
|
--exclude-dir .tox \
|
2016-11-03 22:33:17 +01:00
|
|
|
| grep -v -F \
|
2017-03-24 03:47:10 +01:00
|
|
|
-e './test/integration/targets/template/files/foo.dos.txt' \
|
|
|
|
-e './test/integration/targets/win_regmerge/templates/win_line_ending.j2' \
|
|
|
|
-e './test/integration/targets/win_template/files/foo.dos.txt' \
|
2016-11-03 22:33:17 +01:00
|
|
|
|
|
|
|
if [ $? -ne 1 ]; then
|
|
|
|
printf 'One or more file(s) listed above have invalid line endings.\n'
|
|
|
|
printf 'Make sure all files use "\\n" for line endings instead of "\\r\\n".\n'
|
|
|
|
exit 1
|
|
|
|
fi
|