add bin/find_crlf (shell script to find CRLF line endings)

This commit is contained in:
Lexi Stelter 2021-02-25 18:46:35 +01:00
parent b1a554d913
commit 734946a7ab
No known key found for this signature in database
GPG Key ID: 67157587E55232FE
1 changed files with 16 additions and 0 deletions

16
bin/find_crlf Executable file
View File

@ -0,0 +1,16 @@
#!/bin/bash
EXCLUDES=(
"*/node_modules/*"
"*/.git/*"
"*/__pycache__/*"
)
EXCLUDE_PARAMS=()
for path in "${EXCLUDES[@]}"; do
EXCLUDE_PARAMS+=("-not" "-path" "$path")
done
find . -type f "${EXCLUDE_PARAMS[@]}" -exec file '{}' \; | grep 'CRLF'