From 508229fa011fa0a9c90abe84b04d7d057abb924a Mon Sep 17 00:00:00 2001 From: Volpeon Date: Mon, 21 Dec 2020 21:53:39 +0100 Subject: Improved watch scripts --- content/index.md | 2 +- scripts/watch_content.sh | 9 ++++++--- scripts/watch_sass.sh | 9 ++++++--- 3 files changed, 13 insertions(+), 7 deletions(-) diff --git a/content/index.md b/content/index.md index 14b1337..f595457 100644 --- a/content/index.md +++ b/content/index.md @@ -3,7 +3,7 @@ title: "Index" ismain: true --- -# Volpeon's den +# Volpeon's Den Welcome to my website! I'm Volpeon and here's an [inline link](#). 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