From 38e8338380e35f9c3c55c6232121cb7575d5cbfb Mon Sep 17 00:00:00 2001 From: =?utf8?q?Paul=20H=C3=A4nsch?= Date: Mon, 9 Oct 2023 15:17:59 +0200 Subject: [PATCH] workaround for hosters without /bin/awk --- parsers/60_macros.awk => macros.awk | 0 parsers/60_macros.sh | 23 +++++++++++++++++++++++ 2 files changed, 23 insertions(+) rename parsers/60_macros.awk => macros.awk (100%) create mode 100755 parsers/60_macros.sh diff --git a/parsers/60_macros.awk b/macros.awk similarity index 100% rename from parsers/60_macros.awk rename to macros.awk diff --git a/parsers/60_macros.sh b/parsers/60_macros.sh new file mode 100755 index 0000000..60ac8f3 --- /dev/null +++ b/parsers/60_macros.sh @@ -0,0 +1,23 @@ +#!/bin/sh + +# Copyright 2023 Paul Hänsch +# +# Permission to use, copy, modify, and/or distribute this software for any +# purpose with or without fee is hereby granted, provided that the above +# copyright notice and this permission notice appear in all copies. +# +# THE SOFTWARE IS PROVIDED “AS IS” AND THE AUTHOR DISCLAIMS ALL WARRANTIES +# WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +# MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY +# SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +# WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +# ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR +# IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + +if which awk >/dev/null; then + awk -f "$_EXEC/macros.awk" +elif which busybox >/dev/null; then + busybox awk -f "$_EXEC/macros.awk" +else + cat +fi -- 2.39.2