This commit is contained in:
Ben Grande 2023-11-06 13:32:11 +00:00
parent d4687f6254
commit 453ef99617
No known key found for this signature in database
GPG key ID: 00C64E14F51F9E56
7 changed files with 17 additions and 64 deletions

View file

@ -25,8 +25,8 @@ elif command -v fdfind >/dev/null; then
fi
case "${find_tool}" in
fd|fdfind) files="minion.d/qusal.conf $(${find_tool} . qusal/ --max-depth=1 --type=f --extension=sls --extension=top)";;
find) files="minion.d/qusal.conf $(find qusal/* -maxdepth 1 -type f \( -name '*.sls' -o -name '*.top' \))";;
fd|fdfind) files="minion.d/qusal.conf $(${find_tool} . qusal/ --max-depth=2 --type=f --extension=sls --extension=top)";;
find) files="minion.d/qusal.conf $(find qusal/* -maxdepth 2 -type f \( -name '*.sls' -o -name '*.top' \))";;
esac
salt-lint ${conf} ${files}

View file

@ -33,14 +33,19 @@ case "${find_tool}" in
--exec sh -c '
case $( file -bi "$1" ) in (*/x-shellscript*)
printf "%s\n" "$1";; esac' sh)"
files="${files} $(${find_tool} . --max-depth=1 --type=f --extension=sh)"
## No Shebang
sh_files="$(${find_tool} rc.local qusal/ --type=f)"
;;
find)
files="$(find scripts/ "${group}"/ -not \( -path "*/zsh" -prune \) -type f -exec sh -c '
case $( file -bi "$1" ) in (*/x-shellscript*) exit 0;; esac
exit 1' sh {} \; -print)"
files="${files} $(find . -maxdepth 1 -type f -name "*.sh")"
## No Shebang
sh_files="$(find "${group}"/ -type f -name "rc.local")"
;;
esac
files="$(echo "$files" | sort -u)"
sh_files="$(echo "$sh_files" | sort -u)"
shellcheck ${files}
shellcheck -s sh ${sh_files}