#!/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