diff options
Diffstat (limited to 'scripts/watch_content.sh')
-rwxr-xr-x | scripts/watch_content.sh | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/scripts/watch_content.sh b/scripts/watch_content.sh index 38567dc..60f7b07 100755 --- a/scripts/watch_content.sh +++ b/scripts/watch_content.sh | |||
@@ -1,12 +1,12 @@ | |||
1 | #!/bin/bash | 1 | #!/bin/bash |
2 | 2 | ||
3 | inotifywait -rme create,close_write,delete,move --format "%f" content \ | 3 | inotifywait -rme create,close_write,delete,move --format "%w%f" content \ |
4 | | while read FILENAME | 4 | | while read FILENAME |
5 | do | 5 | do |
6 | printf "Change detected: %s\n" "content/$FILENAME" | 6 | printf "Change detected: %s\n" "$FILENAME" |
7 | if [ -f "content/$FILENAME" ]; then | 7 | if [ -f "$FILENAME" ]; then |
8 | scripts/build_content.sh "content/$FILENAME" | 8 | scripts/build_content.sh "$FILENAME" |
9 | else | 9 | elif [ ! -d "$FILENAME" ]; then |
10 | scripts/build_content.sh "content/$FILENAME" "delete" | 10 | scripts/build_content.sh "$FILENAME" "delete" |
11 | fi | 11 | fi |
12 | done | 12 | done |