1
0
mirror of https://github.com/Zygo/bees.git synced 2025-05-17 21:35:45 +02:00

docs: derive docs/index.md from README.md

The two files are identical except README.md links to docs/* while
index.md links to *.

A sed script can do that transformation, so use sed to do it.

This does modify a file in git, but this is necessary to make all
the Github views work consistently.

Signed-off-by: Zygo Blaxell <bees@furryterror.org>
This commit is contained in:
Zygo Blaxell 2018-11-22 21:14:21 -05:00
parent bf2a014607
commit 012219bbfb

View File

@ -1,8 +1,12 @@
MARKDOWN := $(firstword $(shell type -P markdown markdown2 markdown_py 2>/dev/null || echo markdown)) MARKDOWN := $(firstword $(shell type -P markdown markdown2 markdown_py 2>/dev/null || echo markdown))
.PHONY: docs .PHONY: docs
docs: $(subst .md,.html,$(wildcard *.md)) ../README.html docs: $(subst .md,.html,$(wildcard *.md)) index.html ../README.html
%.html: %.md %.html: %.md
$(MARKDOWN) $< | sed -e 's/\.md/\.html/g' > $@.new $(MARKDOWN) $< | sed -e 's/\.md/\.html/g' > $@.new
mv -f $@.new $@ mv -f $@.new $@
index.md: ../README.md
sed -e 's:docs/::g' < ../README.md > index.md.new
mv -f index.md.new index.md