Skip to content

Instantly share code, notes, and snippets.

@adewes
Created November 12, 2015 10:28
Show Gist options
  • Save adewes/b05664e0c1d7d67c4cf3 to your computer and use it in GitHub Desktop.
Save adewes/b05664e0c1d7d67c4cf3 to your computer and use it in GitHub Desktop.
The build watcher: Automatically rebuild Pelican content as files change.
# Changes gather, and now my watch begins.
# It shall not end until my death.
# I shall live and die at my post.
# I am the process in the darkness.
# I am the watcher on the files.
# I am the shield that guards the realms of the build dir.
watch:
@which inotifywait || (echo "Please install inotifywait";exit 2)
@while true ; do \
inotifywait -r . -e create,delete,move,modify || break; \
$(MAKE) html || break;\
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment