summaryrefslogtreecommitdiffstats
path: root/scripts/LinuxManBook/build.sh
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/LinuxManBook/build.sh')
-rwxr-xr-xscripts/LinuxManBook/build.sh30
1 files changed, 20 insertions, 10 deletions
diff --git a/scripts/LinuxManBook/build.sh b/scripts/LinuxManBook/build.sh
index 8e373c073..fcb8b8362 100755
--- a/scripts/LinuxManBook/build.sh
+++ b/scripts/LinuxManBook/build.sh
@@ -1,15 +1,25 @@
-#!/bin/sh
-# Copyright 2023, Alejandro Colomar <alx@kernel.org>
+#!/usr/bin/env -Sbash
+# Copyright 2023-2024, Alejandro Colomar <alx@kernel.org>
# SPDX-License-Identifier: GPL-3.0-or-later
+
+test -v CAT || CAT=cat;
+test -v PRECONV || PRECONV=preconv;
+test -v PIC || PIC=pic;
+test -v TBL || TBL=tbl;
+test -v EQN || EQN=eqn;
+test -v TROFF || TROFF=troff;
+test -v GROPDF || GROPDF=gropdf;
+
+
(
- cat "$(dirname "$0")"/LMBfront.roff;
- cat "$(dirname "$0")"/an.tmac;
+ $CAT "$(dirname "$0")"/LMBfront.roff;
+ $CAT "$(dirname "$0")"/an.tmac;
"$(dirname "$0")"/prepare.pl "$1";
) \
-| preconv \
-| pic \
-| tbl \
-| eqn -Tpdf \
-| troff -Tpdf -F"$(dirname "$0")" -dpaper=a4 \
-| gropdf -F"$(dirname "$0")" -pa4;
+| $PRECONV \
+| $PIC \
+| $TBL \
+| $EQN -Tpdf \
+| $TROFF -Tpdf -F"$(dirname "$0")" -dpaper=a4 \
+| $GROPDF -F"$(dirname "$0")" -pa4;