Add Dir Support to Clean_Files; Clean powerline theme

This commit is contained in:
David Farrell
2020-11-03 16:14:02 -08:00
parent 52c0f6564e
commit a858e75456
4 changed files with 247 additions and 212 deletions

View File

@@ -1,7 +1,16 @@
#!/usr/bin/env bash
# Pull list of checkable files from clean_files.txt
# - Folder references are allowed
# - Empty lines are ignored
# - Comment lines (#) are ignored
#
mapfile -t FILES < clean_files.txt
# shellcheck disable=SC2002 # Prefer 'cat' for cleaner script
mapfile -t FILES < <(
cat clean_files.txt \
| grep -v -E '^\s*$' \
| grep -v -E '^\s*#' \
| xargs -n1 -I{} find "{}" -type f
)
pre-commit run --files "${FILES[@]}"
BASH_IT='' pre-commit run --files "${FILES[@]}"