Work with POSIX /usr/bin/env. - tgtimes - The Gopher Times
(HTM) git clone git://bitreich.org/tgtimes git://enlrupgkhuxnvlhsf6lc3fziv5h2hhfrinws65d7roiv6bfj7d652fid.onion/tgtimes
(DIR) Log
(DIR) Files
(DIR) Refs
(DIR) Tags
(DIR) README
---
(DIR) commit 6283bfe7d345d40fc37e17a9a7a984f67ce2f0b6
(DIR) parent 6eeb4cd1faa551f33e0662379c6104d9027ecbaf
(HTM) Author: Troels Henriksen <athas@sigkill.dk>
Date: Sun, 27 Aug 2023 22:07:16 +0200
Work with POSIX /usr/bin/env.
Signed-off-by: Christoph Lohmann <20h@r-36.net>
Diffstat:
M filters/nudge.filter | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
---
(DIR) diff --git a/filters/nudge.filter b/filters/nudge.filter
@@ -1,8 +1,9 @@
-#!/usr/bin/env -S awk -f
+#!/bin/sh
#
# Insert blank lines between sections to avoid ugly orphans in PDF
# output.
+awk '
BEGIN {
LINES_PER_PAGE=73 # Determined by observation.
MAX_SPACING=5 # Max empty we wish to allow at bottom of page.
@@ -22,5 +23,5 @@ BEGIN {
incontent = 1;
}
/`----/ { incontent = 0; }
-{ print $0; line++; }
+{ print $0; line++; }'