Files
garble/scripts/crlf-test.sh
Daniel Martí 805c895d59 set up an AUTHORS file to attribute copyright
Many files were missing copyright, so also add a short script to add the
missing lines with the current year, and run it.

The AUTHORS file is also self-explanatory. Contributors can add
themselves there, or we can simply update it from time to time via
git-shortlog.

Since we have two scripts now, set up a directory for them.
2020-09-06 21:22:14 +01:00

21 lines
367 B
Bash
Executable File

#!/bin/bash
if \
grep \
--recursive \
--files-with-matches \
--binary \
--binary-files=without-match \
--max-count=1 \
--exclude-dir="\.git" \
$'\r' \
. \
; then
# TODO exit status should be number of files with wrong endings found
echo -e "Found at least a file with CRLF endings."
exit 1
fi
echo -e "No files with CRLF endings found."
exit 0