This commit is contained in:
2026-11-30 17:16:37 +01:00
parent a430080725
commit 5e6a665265
+4 -4
View File
@@ -1,10 +1,10 @@
#!/bin/bash #!/bin/sh
set -euo pipefail set -euo pipefail
script_name=${0##*/} script_name=$(basename "$0")
if (( $# == 0 )); then if [ "$#" -eq 0 ]; then
echo "Usage: $script_name command [args ...]" >&2 echo "Usage: $script_name command [args ...]" >&2
exit 2 exit 2
fi fi
@@ -15,6 +15,6 @@ if ! command -v inotifywait >/dev/null; then
fi fi
while true; do while true; do
("$@") || echo "$script_name: command exited with status $?" >&2 ( "$@" ) || echo "$script_name: command exited with status $?" >&2
inotifywait --quiet --recursive --event close_write,move,create,delete . >/dev/null inotifywait --quiet --recursive --event close_write,move,create,delete . >/dev/null
done done