summaryrefslogtreecommitdiffstats
path: root/scripts/LinuxManBook/build.sh
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/LinuxManBook/build.sh')
-rwxr-xr-xscripts/LinuxManBook/build.sh25
1 files changed, 25 insertions, 0 deletions
diff --git a/scripts/LinuxManBook/build.sh b/scripts/LinuxManBook/build.sh
new file mode 100755
index 0000000..fcb8b83
--- /dev/null
+++ b/scripts/LinuxManBook/build.sh
@@ -0,0 +1,25 @@
+#!/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;
+ "$(dirname "$0")"/prepare.pl "$1";
+) \
+| $PRECONV \
+| $PIC \
+| $TBL \
+| $EQN -Tpdf \
+| $TROFF -Tpdf -F"$(dirname "$0")" -dpaper=a4 \
+| $GROPDF -F"$(dirname "$0")" -pa4;