automatically show dependencies

This commit is contained in:
Malin Freeborn 2025-02-11 18:04:03 +01:00
parent 481b34a472
commit eeade3cdfb
Signed by: andonome
GPG Key ID: 52295D2377F4D70F
5 changed files with 17 additions and 6 deletions

View File

@ -7,10 +7,17 @@ articles != find * -type f -name "*.md"
db.rec: $(articles) db.rec: $(articles)
for x in $^ ; do \ for x in $^ ; do \
sed -n '2,/^---$$/ {/^---$$/d; p}' "$$x" |\ sed -n '2,/^---$$/ {/^---$$/d; p}' "$$x" |\
tr -d '"[]' ;\ sed -e 's/\[ //' -e 's/ \]//' |\
printf "file: %s\n\n" "$$x" ;\ tr -d '"' ;\
printf "file: %s\n\n" "$$x" ;\
done > $@ 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 default += db.rec
@ -32,6 +39,6 @@ article: ## Write an article
printf '%s\n\n' '---' >> $$path/$$title.md ;\ printf '%s\n\n' '---' >> $$path/$$title.md ;\
$(EDITOR) +5 $$path/$$title.md $(EDITOR) +5 $$path/$$title.md
.PHONY: clean ## Remove all generated files .PHONY: clean
clean: clean: ## Remove all generated files
$(RM) $(default) $(RM) $(default)

View File

@ -1,6 +1,7 @@
--- ---
title: "basic-install" title: "basic-install"
tags: [ "Documentation", "arch" ] tags: [ "Documentation", "arch" ]
requires: [ "partitions", "time" ]
--- ---
Keyboard layout changed. Keyboard layout changed.

View File

@ -1,6 +1,7 @@
--- ---
title: "fail2ban" title: "fail2ban"
tags: [ "Documentation", "Networking" ] tags: [ "Documentation", "Networking" ]
requires: [ "ssh" ]
--- ---
# SSH Daemon Jail # SSH Daemon Jail

View File

@ -1,6 +1,7 @@
--- ---
title: "sshfs" title: "sshfs"
tags: [ "Documentation", "Networking" ] tags: [ "Documentation", "Networking" ]
requires: [ "ssh" ]
--- ---
# Mount # Mount

View File

@ -1,6 +1,7 @@
--- ---
title: "ssh tricks" title: "ssh-tricks"
tags: [ "Documentation", "Networking", "ssh", "tricks" ] tags: [ "Documentation", "Networking", "ssh", "tricks" ]
requires: [ "ssh" ]
--- ---
Mount a remote filesystem locally with fuse-sshfs: Mount a remote filesystem locally with fuse-sshfs: