Add Dir Support to Clean_Files; Clean powerline theme
This commit is contained in:
@@ -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[@]}"
|
||||
|
||||
Reference in New Issue
Block a user