You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
garble/scripts/crlf-test.sh

21 lines
367 B
Bash

#!/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