summaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
authorMarc Vertes <mvertes@free.fr>2023-11-07 10:54:34 +0100
committerMarc Vertes <mvertes@free.fr>2023-11-07 10:54:34 +0100
commitbdb09c08d24f4bb4e1acbd50fc1eb236d5c78cbe (patch)
treea9d2294f00a7acb3eba797c8a37abbbb939bfce2 /bin
parent206619d3601445ec9a3be05d9bb3064760595b74 (diff)
bin/dw: execute command whenever dir changes
Diffstat (limited to 'bin')
-rwxr-xr-xbin/dw10
1 files changed, 10 insertions, 0 deletions
diff --git a/bin/dw b/bin/dw
new file mode 100755
index 0000000..b000d58
--- /dev/null
+++ b/bin/dw
@@ -0,0 +1,10 @@
+#!/bin/sh
+
+# Execute given command when current dir content changes.
+#
+trap exit SIGINT
+
+while true; do
+ fswatch -1 . >/dev/null 2>&1
+ "$@"
+done