From d42d6fc45f50a09d36d912c0d68ee0794ac1e520 Mon Sep 17 00:00:00 2001 From: EuAndreh Date: Wed, 1 Jun 2022 20:33:47 -0300 Subject: Move files.mk and deps.mk into generated.mk Make torrent files dynamic instead of listed in Makefile. --- src/development/dynmake.sh | 42 +++++++++++++++++++++++++++++++++++++++--- 1 file changed, 39 insertions(+), 3 deletions(-) (limited to 'src/development/dynmake.sh') diff --git a/src/development/dynmake.sh b/src/development/dynmake.sh index 9c60b88..9b74a9f 100755 --- a/src/development/dynmake.sh +++ b/src/development/dynmake.sh @@ -56,11 +56,47 @@ assert_arg() { -printf 'pastebins.md = \\\n' -find src/content/pastebin -name '*.md' | +varlist() { sed -e 's/^/ /' \ -e 's/$/ \\/' +} + +# +# Pastebins +# + +pastebins() { + find src/content/pastebin -name '*.md' +} + +printf 'pastebins.md = \\\n' +pastebins | + varlist + printf '\n' -find src/content/pastebin -name '*.md' | +pastebins | sed 's/^\(.*\)\.md$/\1.html: \1.env/' + + + +# +# torrent files +# + +torrents() { + find resources \ + -name '*.flac' -or \ + -name '*.ogg' -or \ + -name '*.webm' +} + +printf 'torrent-files = \\\n' + +torrents | + sed 's|$|.torrent|' | + varlist + +printf '\n' + +torrents | awk '{ printf "%s.torrent: %s\n", $0, $0 }' -- cgit v1.2.3