From 486af48ae836b95a5c528f14b5b115a0ca3f2348 Mon Sep 17 00:00:00 2001 From: Atlas Cove Date: Sat, 18 Feb 2023 23:45:41 +0000 Subject: [PATCH] Output bugfixes --- m4/lib.m4 | 2 +- m4/main.html.m4 | 6 +++--- render.sh | 7 ++++--- 3 files changed, 8 insertions(+), 7 deletions(-) diff --git a/m4/lib.m4 b/m4/lib.m4 index 46841d6..08a4ee5 100644 --- a/m4/lib.m4 +++ b/m4/lib.m4 @@ -3,4 +3,4 @@ divert(-1) define(`_ytv',`') define(`_wrap',<$1>$2) define(`_empty',`') -divert dnl +divert`'dnl diff --git a/m4/main.html.m4 b/m4/main.html.m4 index e61a4cd..c0dd399 100644 --- a/m4/main.html.m4 +++ b/m4/main.html.m4 @@ -1,14 +1,14 @@ dnl template.m4.html v2.0-p1 dnl Part of the tape-and-string suite used to construct the website ifdef(`DEBUG',`traceon')dnl -ifdef(`_INFILE',`dnl ',`errprint(`Macro _INFILE is not defined') -m4exit(1)')dnl +ifdef(`_INFILE',`dnl',`errprint(`Macro _INFILE is not defined')m4exit(1)') +ifdef(`TITLE',`dnl',`define(`TITLE',`Atlas48 Archives')dnl)') include(`m4/lib.m4')dnl TITLE diff --git a/render.sh b/render.sh index c768e8e..d2bd515 100755 --- a/render.sh +++ b/render.sh @@ -1,6 +1,6 @@ #!/bin/bash # render.sh: part of the tape-and-string framework. -# v3.4-p4 +# v3.4-p5 #B: Load enable -f /usr/lib/bash/csv csv declare -A title @@ -34,11 +34,12 @@ function docs { inf "Rendering document files..." for i in ${doc[@]}; do o="${i/in/out}" + o="${o%.*}.html" echo "'$i' -> '$o'" if test -z "${title[$i]}"; then - m4 -D_INFILE="$i" -DCSSI=$(awk -f awk/getsd.awk <<< "$i") m4/main.html.m4 > ${o%.*}.html + m4 -D_INFILE="$i" -DCSSI=$(awk -f awk/getsd.awk <<< "$i") m4/main.html.m4 > $o else - m4 -D_INFILE="$i" -DCSSI=$(awk -f awk/getsd.awk <<< "$i") -DTITLE="${title[$i]}" m4/main.html.m4 > ${o%.*}.html + m4 -D_INFILE="$i" -DCSSI=$(awk -f awk/getsd.awk <<< "$i") -DTITLE="${title[$i]}" m4/main.html.m4 > $o fi done }