diff --git a/Makefile b/Makefile index d471726..c4e2977 100644 --- a/Makefile +++ b/Makefile @@ -7,10 +7,17 @@ articles != find * -type f -name "*.md" db.rec: $(articles) for x in $^ ; do \ - sed -n '2,/^---$$/ {/^---$$/d; p}' "$$x" |\ - tr -d '"[]' ;\ - printf "file: %s\n\n" "$$x" ;\ + sed -n '2,/^---$$/ {/^---$$/d; p}' "$$x" |\ + sed -e 's/\[ //' -e 's/ \]//' |\ + tr -d '"' ;\ + printf "file: %s\n\n" "$$x" ;\ done > $@ + recsel $@ -e "requires != ''" -CR title,requires |\ + while read title requires; do \ + IFS=', ' && for provider in $$requires; do \ + recset $@ -e "title = '$${provider}'" -f provides -a "$${title}" ;\ + done ;\ + done default += db.rec @@ -32,6 +39,6 @@ article: ## Write an article printf '%s\n\n' '---' >> $$path/$$title.md ;\ $(EDITOR) +5 $$path/$$title.md -.PHONY: clean ## Remove all generated files -clean: +.PHONY: clean +clean: ## Remove all generated files $(RM) $(default) diff --git a/distros/arch/basic-install.md b/distros/arch/basic-install.md index 36ca460..1a610e2 100644 --- a/distros/arch/basic-install.md +++ b/distros/arch/basic-install.md @@ -1,6 +1,7 @@ --- title: "basic-install" tags: [ "Documentation", "arch" ] +requires: [ "partitions", "time" ] --- Keyboard layout changed. diff --git a/networking/fail2ban.md b/networking/fail2ban.md index 0d2ab5b..01ef19d 100644 --- a/networking/fail2ban.md +++ b/networking/fail2ban.md @@ -1,6 +1,7 @@ --- title: "fail2ban" tags: [ "Documentation", "Networking" ] +requires: [ "ssh" ] --- # SSH Daemon Jail diff --git a/networking/ssh/sshfs.md b/networking/ssh/sshfs.md index 7498b17..2a25233 100644 --- a/networking/ssh/sshfs.md +++ b/networking/ssh/sshfs.md @@ -1,6 +1,7 @@ --- title: "sshfs" tags: [ "Documentation", "Networking" ] +requires: [ "ssh" ] --- # Mount diff --git a/networking/ssh/tricks.md b/networking/ssh/tricks.md index 574842e..0b8f575 100644 --- a/networking/ssh/tricks.md +++ b/networking/ssh/tricks.md @@ -1,6 +1,7 @@ --- -title: "ssh tricks" +title: "ssh-tricks" tags: [ "Documentation", "Networking", "ssh", "tricks" ] +requires: [ "ssh" ] --- Mount a remote filesystem locally with fuse-sshfs: