#!/bin/bash inotifywait -rme create,close_write,delete,move --format "%f" content \ | while read FILENAME do printf "Change detected: %s\n" "content/$FILENAME" if [ -f "content/$FILENAME" ]; then scripts/build_content.sh "content/$FILENAME" else scripts/build_content.sh "content/$FILENAME" "delete" fi done