From 508229fa011fa0a9c90abe84b04d7d057abb924a Mon Sep 17 00:00:00 2001 From: Volpeon Date: Mon, 21 Dec 2020 21:53:39 +0100 Subject: Improved watch scripts --- scripts/watch_content.sh | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'scripts/watch_content.sh') diff --git a/scripts/watch_content.sh b/scripts/watch_content.sh index 59d60a4..d2578e1 100755 --- a/scripts/watch_content.sh +++ b/scripts/watch_content.sh @@ -1,5 +1,8 @@ #!/bin/bash -while inotifywait -r -e close_write content; do - scripts/build_content.sh -done +inotifywait -m -e create -e close_write --format "%f" content \ + | while read FILENAME + do + printf "Change detected: %s\n" "$FILENAME" + scripts/build_content.sh + done -- cgit v1.2.3-54-g00ecf