summaryrefslogtreecommitdiffstats
path: root/scripts/watch_content.sh
blob: c4f55fb1473f3b912e6a30057ec0321c204e1504 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
#!/bin/bash

inotifywait -qrme close_write,delete,move --format "%w%f" content \
    | while read FILENAME
        do
            if [ -f "$FILENAME" ]; then
                scripts/build_content.sh "$FILENAME"
            elif [ ! -d "$FILENAME" ]; then
                scripts/build_content.sh "$FILENAME" "delete"
            fi
        done