v4orb2.wiki

описание пикапов и диссектора ВЭПП3-4
git clone http://www.inp.nsk.su/~bekhte/v4orb2.wiki.git
Log | Files | Refs

commit 4f55b3c1e1c96817a1aa72855098fe06ad1a3a3d
parent ac6ae249f027bb736d509a778c7738a47aaf91d5
Author: E.A.Bekhtenev <E.A.Bekhtenev@inp.nsk.su>
Date:   Wed Mar  1 06:14:03 +0700

live update

Diffstat:
.gitignore | 1+
Makefile | 22++++++++++++++++++++--
2 files changed, 21 insertions(+), 2 deletions(-)
diff --git a/.gitignore b/.gitignore @@ -1,2 +1,3 @@ *.html history.log.txt +config.make diff --git a/Makefile b/Makefile @@ -12,8 +12,9 @@ endif %.html: %.md Makefile history.log.txt $(MULTIMARKDOWN) $< -o $@ -# echo "<html> <body> <head> <meta charset="utf8"> </head>" > $@ -# echo "</html>" >> $@ +ifeq ("$(REFRESH)","1") + sed -i "/meta charset/a <meta http-equiv=\"refresh\" content=\"1\">" $@ +endif %.pdf: %.md Makefile history.log.txt $(MULTIMARKDOWN) -b -t odf $< -o $@ @@ -27,3 +28,20 @@ history.log.txt: Makefile clean: rm -rf *.html history.log.txt + +-include config.make + +ifneq ("$(RSYNC_URL)","") +RSYNC_CMD = rsync -avP --delete --del *.html *.css *.png *.img $(RSYNC_URL) +endif + +live: + inotifywait -m -e modify --exclude "./sed*" . | \ + while read a b c; do \ + case "$$b$$c" in \ + MODIFY*.md) make REFRESH=1; $(RSYNC_CMD);; \ + esac \ + done ; true + + +