mirror of
https://github.com/samsonjs/samhuri.net.git
synced 2026-04-27 14:57:40 +00:00
Add a script to watch for changes and rebuild
This commit is contained in:
parent
9bebea8225
commit
60af819160
2 changed files with 14 additions and 1 deletions
5
Makefile
5
Makefile
|
|
@ -47,4 +47,7 @@ serve:
|
||||||
@echo
|
@echo
|
||||||
cd www && python -m SimpleHTTPServer
|
cd www && python -m SimpleHTTPServer
|
||||||
|
|
||||||
.PHONY: debug ocean beta release publish publish_beta clean clean_blog clean_swift serve
|
watch:
|
||||||
|
bin/watch
|
||||||
|
|
||||||
|
.PHONY: debug ocean beta release publish publish_beta clean clean_blog clean_swift serve watch
|
||||||
|
|
|
||||||
10
bin/watch
Executable file
10
bin/watch
Executable file
|
|
@ -0,0 +1,10 @@
|
||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
BLOG_TARGET=${BLOG_TARGET:-ocean}
|
||||||
|
|
||||||
|
while true; do
|
||||||
|
inotifywait -e modify,create,delete,move -r drafts -r posts
|
||||||
|
echo "changed at $(date)"
|
||||||
|
sleep 5
|
||||||
|
make "$TARGET"
|
||||||
|
done
|
||||||
Loading…
Reference in a new issue