2024-03-29 19:06:55 +00:00
|
|
|
#!/bin/sh
|
|
|
|
|
|
|
|
set -euo pipefail
|
|
|
|
|
2024-03-30 16:38:36 +00:00
|
|
|
lowdown_args=
|
2024-03-29 19:06:55 +00:00
|
|
|
|
2024-03-30 16:38:36 +00:00
|
|
|
if [ "$1" = --out-no-smarty ]; then
|
|
|
|
lowdown_args=--out-no-smarty
|
2024-03-29 19:06:55 +00:00
|
|
|
shift
|
|
|
|
fi
|
|
|
|
|
|
|
|
title="$1"
|
|
|
|
section="$2"
|
|
|
|
infile="$3"
|
|
|
|
tmpfile="$4"
|
|
|
|
outfile="$5"
|
|
|
|
|
|
|
|
printf "Title: %s\n\n" "$title" > "$tmpfile"
|
|
|
|
cat "$infile" >> "$tmpfile"
|
|
|
|
"$(dirname "$0")"/process-includes.sh "$infile" "$tmpfile"
|
2024-03-30 16:38:36 +00:00
|
|
|
lowdown -sT man --nroff-nolinks $lowdown_args -M section="$section" "$tmpfile" -o "$outfile"
|
2024-03-29 19:06:55 +00:00
|
|
|
rm "$tmpfile"
|