-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathMakefile
33 lines (25 loc) · 1003 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
29
30
31
32
33
SHELL := /bin/bash
RNP_ZIP_VERSION := 0.17.0
CLEAN_TARGETS := _site _man_pages rnp.zip
all: _site
rnp.zip:
curl -sSL https://github.com/rnpgp/rnp/archive/refs/tags/v${RNP_ZIP_VERSION}.zip -o $@
_man_pages: rnp.zip
mkdir -p $@; \
unzip -jd $@ $< "*.1.adoc" "*.3.adoc"; \
find $@ -name '*.adoc' -exec sed -i.bak -e '2,3d' {} \; ; \
find $@ -name '*.adoc' -exec sed -i.bak 's/{component-version}/${RNP_ZIP_VERSION}/g' {} \; ; \
find $@ -name '*.adoc' -exec sed -i.bak 's/{release-version}/${RNP_ZIP_VERSION}/g' {} \; ; \
find $@ -name '*.adoc' -exec sed -i.bak 's/^= \(.*\)$$/---\ntitle: \1\nexcerpt: man page for \1, version ${RNP_ZIP_VERSION}\n---/g' {} \; ; \
rm -f $@/*.bak
clean:
rm -rf ${CLEAN_TARGETS}
rm -rf _software/*/.git _software/*/docs _software/_*_repo parent-hub/*
rm -rf .sass-cache .jekyll-cache .jekyll-metadata
bundle:
bundle
_site: _man_pages
bundle exec jekyll build --trace
serve: _man_pages
bundle exec jekyll serve --trace
.PHONY: bundle all open serve clean