first
This commit is contained in:
commit
0b41af265e
26 changed files with 1103 additions and 0 deletions
41
Makefile
Normal file
41
Makefile
Normal file
|
@ -0,0 +1,41 @@
|
|||
# only for the web page. use cabal if you actually want to run the program
|
||||
|
||||
OUT := /srv/www/lit/ips
|
||||
|
||||
STATICS != find style -type f
|
||||
SRCS = ips.lhs
|
||||
OUTPUTS = $(OUT)/ips.html \
|
||||
$(patsubst %,$(OUT)/%,$(STATICS))
|
||||
|
||||
HOST ?= rhiannon.website
|
||||
SSH_PORT ?= 35353
|
||||
REMOTE_USER ?= nginx
|
||||
REMOTE_DIR ?= lit/ips
|
||||
|
||||
|
||||
all: $(OUTPUTS)
|
||||
|
||||
clean:
|
||||
rm -rf $(OUT)/*
|
||||
|
||||
$(OUT)/%.html: %.lhs template.html ; $(pandoc)
|
||||
$(OUT)/%: % ; $(copy)
|
||||
|
||||
define copy
|
||||
mkdir -p $(dir $@)
|
||||
cp $< $@
|
||||
endef
|
||||
|
||||
define pandoc
|
||||
mkdir -p $(dir $@)
|
||||
pandoc -M toc-title=contents --toc-depth 2 --toc \
|
||||
--strip-comments \
|
||||
--template template.html $< -o $@
|
||||
endef
|
||||
|
||||
upload:
|
||||
rsync --recursive --partial --progress --copy-links \
|
||||
--compress --human-readable --hard-links --size-only \
|
||||
--delete --delete-after \
|
||||
--rsh='ssh -l $(REMOTE_USER) -p $(SSH_PORT)' \
|
||||
$(OUT)/ $(HOST):$(REMOTE_DIR)/
|
Loading…
Add table
Add a link
Reference in a new issue