summaryrefslogtreecommitdiffstats
path: root/scripts/watch_content.sh
blob: 769f2c5ff4d389961215494515d877c17d3687b9 (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 "single" "$FILENAME"
            elif [ ! -d "$FILENAME" ]; then
                scripts/build_content.sh "delete" "$FILENAME"
            fi
        done