]> git.plutz.net Git - shellwiki/commitdiff
bugfix in macro parser: enable throughput if macros are disabled
authorPaul Hänsch <paul@plutz.net>
Tue, 6 Feb 2024 12:18:34 +0000 (13:18 +0100)
committerPaul Hänsch <paul@plutz.net>
Tue, 6 Feb 2024 12:18:34 +0000 (13:18 +0100)
parsers/60_macros.sh

index 60ac8f3d73e50d0e8fdb7eb5b80ef653174d573b..7d5232d3bb7b96bda27925d921f76aa600aeb300 100755 (executable)
@@ -1,6 +1,6 @@
 #!/bin/sh
 
-# Copyright 2023 Paul Hänsch
+# Copyright 2023, 2024 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
@@ -14,7 +14,9 @@
 # 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
+if [ ! "$MD_MACROS" ]; then
+  cat
+elif which awk >/dev/null; then
   awk -f "$_EXEC/macros.awk"
 elif which busybox >/dev/null; then
   busybox awk -f "$_EXEC/macros.awk"