mirror of
https://github.com/ben-grande/qusal.git
synced 2025-08-14 17:05:34 -04:00
A
This commit is contained in:
parent
d4687f6254
commit
453ef99617
7 changed files with 17 additions and 64 deletions
|
@ -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}
|
||||
|
|
|
@ -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}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue