Created
June 15, 2010 15:03
-
-
Save vkurup/439230 to your computer and use it in GitHub Desktop.
Watch a blogofile directory and rebuild if a change is noticed.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
BLOGOFILE='/usr/local/bin/blogofile' | |
BLOGDIR='/home/vinod/web/blogofile' | |
while LINE=$(inotifywait -rq --timefmt '%F %R' --format '%T %e %f' -e close_write -e move -e delete "$BLOGDIR"); | |
do | |
cd $BLOGDIR | |
$BLOGOFILE build | |
echo "Rebuilt: $LINE" | |
sleep 5 | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment