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 ++++++--- scripts/watch_sass.sh | 9 ++++++--- 2 files changed, 12 insertions(+), 6 deletions(-) (limited to 'scripts') 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 diff --git a/scripts/watch_sass.sh b/scripts/watch_sass.sh index 69605dc..e7b2952 100755 --- a/scripts/watch_sass.sh +++ b/scripts/watch_sass.sh @@ -1,5 +1,8 @@ #!/bin/bash -while inotifywait -r -e close_write assets; do - scripts/build_sass.sh -done +inotifywait -m -e create -e close_write --format "%f" assets \ + | while read FILENAME + do + printf "Change detected: %s\n" "$FILENAME" + scripts/build_sass.sh + done -- cgit v1.2.3-70-g09d2