configure (741B)
- #!/bin/sh
- # SPDX-FileCopyrightText: 2023 Haelwenn (lanodan) Monnier <contact+blog@hacktivis.me>
- # SPDX-License-Identifier: MIT
- templates_en="./templates/head.xml ./templates/en/nav.xsl ./templates/en/footer.shtml"
- cat >|config.ninja <<-EOF
- # Generated by: $0 $@
- rule gen_config
- command = $0 "$@"
- generator = 1
- build config.ninja: gen_config configure | ./articles
- build entry.xsl: xinclude entry.xsl.in | ${templates_en}
- build bookmarks.xsl: xinclude bookmarks.xsl.in | ${templates_en}
- build nginx_autoindex.xsl: xinclude nginx_autoindex.xsl.in | ${templates_en}
- EOF
- for i in articles/*.xml
- do
- i="${i//$/\$\$}" # '$' → '$$'
- i="${i// /$ }" # ' ' → '$ '
- echo "build ${i//.xml/.html}: article entry.xsl ${i}"
- done >>config.ninja