summaryrefslogtreecommitdiff
path: root/other/mixminion/Makefile
blob: c93821ec9cc8abf6579ffc5137a5635820405283 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
TODAY=`TZ=UTC date +'%Y-%m-%d_%H:%M:%S'`
WGET=wget --cache=off
OUTDIR=mixminion-directory
SOURCE=http://mixminion.net/directory/Directory.gz
TMPFILE=download.tmp
LAST_NAME=dir.last

all:
	rm -f $(TMPFILE)
	$(WGET) -q -O $(TMPFILE) $(SOURCE)
	NAME=directory-$(TODAY).gz; \
		if [ -e $(LAST_NAME) ] && diff -q $(TMPFILE) $(OUTDIR)/`cat $(LAST_NAME)` >/dev/null ; then \
			ln $(OUTDIR)/`cat $(LAST_NAME)` $(OUTDIR)/$$NAME;  \
		else \
			mv $(TMPFILE) $(OUTDIR)/$$NAME; \
			echo "$$NAME" > $(LAST_NAME); \
		fi; \
		bin/rrd-update $$NAME
	rm -rf result
	mkdir result
	bin/rrd-graph 2>&1 | grep -v "*** attempt to put segment in horiz list twice" || true