upr.git  about / heads / tags
Upload Progress for Rack
blob a6517924b1aba61dca689a952a07d518173f0fcb 1054 bytes (raw)
$ git show HEAD:local.mk.sample	# shows this blob on the CLI

 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
29
30
 
# this is the local.mk file used by Eric Wong on his dev boxes.
# GNUmakefile will source local.mk in the top-level source tree
# if it is present.
#
# This is depends on a bunch of GNU-isms from bash, sed, touch.

latest: NEWS
	@awk 'BEGIN{RS="=== ";ORS=""}NR==2{sub(/\n$$/,"");print RS""$$0 }' $<

# publishes docs to http://upr.bogomips.org
publish_doc:
	-git set-file-times
	$(RM) -r doc
	$(MAKE) doc
	$(MAKE) -s latest > doc/LATEST
	find doc/images doc/js -type f | \
		TZ=UTC xargs touch -d '1970-01-01 00:00:00' doc/rdoc.css
	$(MAKE) doc_gz
	chmod 644 $$(find doc -type f)
	rsync -av --delete doc/ dcvr:/srv/upr/
	git ls-files | xargs touch

# Create gzip variants of the same timestamp as the original so nginx
# "gzip_static on" can serve the gzipped versions directly.
doc_gz: suf := html js css
doc_gz: docs = $(shell find doc -type f ! -regex '^.*\.\(gif\|jpg\|png\|gz\)$$')
doc_gz:
	touch doc/NEWS.atom.xml -d "$$(awk 'NR==1{print $$4,$$5,$$6}' NEWS)"
	for i in $(docs); do \
	  gzip --rsyncable -9 < $$i > $$i.gz; touch -r $$i $$i.gz; done

git clone https://yhbt.net/upr.git