From bdb09c08d24f4bb4e1acbd50fc1eb236d5c78cbe Mon Sep 17 00:00:00 2001 From: Marc Vertes Date: Tue, 7 Nov 2023 10:54:34 +0100 Subject: bin/dw: execute command whenever dir changes --- bin/dw | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100755 bin/dw 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 -- cgit v1.2.3