diff --git a/bin/find_crlf b/bin/find_crlf new file mode 100755 index 0000000..79217c3 --- /dev/null +++ b/bin/find_crlf @@ -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' +