mirror of
https://github.com/levogevo/ffmpeg-builder.git
synced 2026-01-15 19:06:17 +00:00
major rework
This commit is contained in:
12
shfmt-watcher.sh
Executable file
12
shfmt-watcher.sh
Executable file
@@ -0,0 +1,12 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
base="$(dirname "$(readlink -f "$0")")"
|
||||
|
||||
inotifywait -m -r \
|
||||
-e close_write \
|
||||
-e moved_to \
|
||||
--format '%w%f' "$base" | while read -r file; do
|
||||
if [[ -f $file && $file =~ .sh ]]; then
|
||||
shfmt --write --simplify "$file"
|
||||
fi
|
||||
done
|
||||
Reference in New Issue
Block a user