-
Notifications
You must be signed in to change notification settings - Fork 4
/
Makefile
28 lines (24 loc) · 1001 Bytes
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
# --reject-regex ';' prevents Apache directory-listings to be downloaded
# multiple times in different sort orders
WGET = wget --recursive --quiet --no-clobber --reject-regex ';'
SDIR = stamper.itconsult.co.uk/stamper-files
SURL = http://${SDIR}/
all:
@echo "Please use 'make get-all' or 'make get-new-sigs'"
get-all:
${WGET} http://www.itconsult.co.uk/index.htm ${SURL}
# Update under the following assumptions:
# - Indexes change daily
# - `sig*.txt` is appended throughout the current year
# (i.e., on January 1st, fetch the previous year's file for the last time)
# - Everything else will not change once it has been written
get-new-sigs:
${RM} ${SDIR}/index.html ${SDIR}/*/index.html
${RM} ${SDIR}/sig`date --date=yesterday +%Y`.txt
${WGET} ${SURL}
# `git timestamp` is configured with `git config timestamp.{server,interval,…}`
cron: get-new-sigs
git add ${SDIR}
git commit -q -S -m "Added `date --date=yesterday +%Y-%m-%d` stamper signatures"
git timestamp
git push -q --all