From 240f8c9a1170e99b0f3a093461462437370f7d59 Mon Sep 17 00:00:00 2001 From: Lars Wirzenius Date: Thu, 15 Sep 2022 09:51:34 +0300 Subject: fix: adjust to new Subplot with external YAML metdata Sponsored-by: author --- check | 45 +++++++++++++++++++++------------------------ subplot.md | 12 ------------ subplot.subplot | 10 ++++++++++ 3 files changed, 31 insertions(+), 36 deletions(-) create mode 100644 subplot.subplot diff --git a/check b/check index 11b7d77..0b2b460 100755 --- a/check +++ b/check @@ -4,24 +4,21 @@ set -eu -o pipefail -cat_with_sep() -{ - for x in "$@" - do - cat "$x" - echo - done +cat_with_sep() { + for x in "$@"; do + cat "$x" + echo + done } hideok=chronic -if [ "$#" -gt 0 ] -then - case "$1" in +if [ "$#" -gt 0 ]; then + case "$1" in verbose | -v | --verbose) - hideok= - shift 1 - ;; - esac + hideok= + shift 1 + ;; + esac fi dir="$(mktemp -d -p .)" @@ -29,24 +26,24 @@ dir="$(mktemp -d -p .)" trap 'rm -rf "$dir"' EXIT rm -f test.log test.py -cp subplot.md "$dir" -cat_with_sep subplot.md roles/*/subplot.md > "$dir/subplot.md" -cat_with_sep subplot/*.py roles/*/subplot.py > "$dir/subplot.py" -cat_with_sep subplot/*.yaml roles/*/subplot.yaml > "$dir/subplot.yaml" +cp subplot.subplot subplot.md "$dir" +cat_with_sep subplot.md roles/*/subplot.md >"$dir/subplot.md" +cat_with_sep subplot/*.py roles/*/subplot.py >"$dir/subplot.py" +cat_with_sep subplot/*.yaml roles/*/subplot.yaml >"$dir/subplot.yaml" ( - set -eu -o pipefail - cd "$dir" - subplot docgen subplot.md -o ../subplot.pdf - subplot docgen subplot.md -o ../subplot.html - subplot codegen subplot.md -o ../test.py + set -eu -o pipefail + cd "$dir" + subplot docgen subplot.subplot -o ../subplot.pdf + subplot docgen subplot.subplot -o ../subplot.html + subplot codegen subplot.subplot -o ../test.py ) # Fix private key permissions. git doesn't preserve them. chmod 0600 ssh/id # Create configuration for the test VMs used by the test suite. -cat > test.cfg <test.cfg <