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

source "site.defaults.conf"

inotifywait -qrme close_write,delete,move --format "%w%f" "${CONTENT_DIR%/}" \
    | while read file
        do
            if [ -f "$file" ]; then
                # scripts/build_content.sh "single" "$file"
                scripts/build_content.sh "all_md"
            elif [ ! -d "$file" ]; then
                scripts/build_content.sh "delete" "$file"
            fi
        done