mirror of
https://github.com/Xevion/dotfiles.git
synced 2025-12-06 15:14:52 -06:00
shellcheck script, ensure that shellcheck cmd available
This commit is contained in:
10
.vscode/shellchecker.sh
vendored
10
.vscode/shellchecker.sh
vendored
@@ -23,14 +23,20 @@ invoke_checker() {
|
||||
fi
|
||||
}
|
||||
|
||||
echo "inotify watcher started"
|
||||
# chek that 'shellcheck' is available
|
||||
if ! command -v shellcheck &> /dev/null; then
|
||||
echo "shellcheck could not be found"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo "initial shellcheck started"
|
||||
|
||||
# Run an initial scan of all shell scripts
|
||||
while IFS= read -rd $'\0' file; do
|
||||
invoke_checker "$file"
|
||||
done < <(find "$ROOT" \( -name "*.sh" -o -name "*.sh.tmpl" \) -type f -print0)
|
||||
|
||||
echo "inotifywait invoking"
|
||||
echo "inotifywait started"
|
||||
inotifywait -mr --quiet --format ' %w %f' -e modify $1 |
|
||||
while read -r dir file; do
|
||||
absolute_path=${dir}${file}
|
||||
|
||||
Reference in New Issue
Block a user