shedali
11/30/2014 - 12:31 AM

remote watch script using inotify to kick off jekyll build in response to dropbox file changes

remote watch script using inotify to kick off jekyll build in response to dropbox file changes

#/bin/bash
regex=[0-9][0-9][0-9][0-9]-.*.\(md\|txt\);
inotifywait -m -e CREATE,DELETE,MOVE ~/Dropbox/note/ |
while read dir ev file;
do
        if [[ $file =~ $regex ]] ; then echo "$file updated"; fi
done