From d921e502745c91ba19be7da664bebb5fa0be6bf3 Mon Sep 17 00:00:00 2001 From: Jacob Bachmeyer Date: Wed, 26 May 2021 20:13:22 -0500 Subject: [PATCH] Remove automatic patch generators These tools have served their purposes and need not be kept outside of the repository history any longer. This patch as a diff also collects the contents of the various tools in one convenient place. * patch-1.gawk: Remove. * patch-3.gawk: Likewise. * patch-6.gawk: Likewise. --- patch-1.gawk | 101 --------------------------------------------------- patch-3.gawk | 99 -------------------------------------------------- patch-6.gawk | 21 ----------- 3 files changed, 221 deletions(-) delete mode 100755 patch-1.gawk delete mode 100755 patch-3.gawk delete mode 100755 patch-6.gawk diff --git a/patch-1.gawk b/patch-1.gawk deleted file mode 100755 index e0f3ea5..0000000 --- a/patch-1.gawk +++ /dev/null @@ -1,101 +0,0 @@ -#!/usr/bin/gawk -f -# -*- Awk -*- - -# Automate (most of) the refactoring of config.guess to use an intermediate variable -# for uname-based results. - -# GPLv3+ - -BEGIN { - if (ARGC < 2) ARGV[ARGC++] = "config.guess" - - Indent = "" - - In_main_case = 0 - - In_here_doc = 0 - Here_doc_end = "" - - If_depth = 0 - If_rewritten = 0 -} - -# Skip here documents -In_here_doc && $0 ~ /^[[:space:]]*EOF/ { In_here_doc = 0 } -In_here_doc { print; next } -/< 0 && /^[[:space:]]+echo/ { - If_rewritten = 1 - rewrite_echo_line() -} - -In_main_case && /^[[:space:]]+exit ;;$/ && If_rewritten { - If_rewritten = 0 - print Indent";;" - next -} - -In_main_case && /^[[:space:]]+echo/ { - getline next_line - if (next_line !~ /^[[:space:]]+exit ;;/) { - # not the output-and-exit we seek here... - print - print next_line - next - } - - if (/-cray-/ && $3 == "|") { - # several Cray Unicos entries apply sed to the entire output in - # order to edit the UNAME_RELEASE field; fix these up - sub(/"\$UNAME_RELEASE"/, "\"$(echo &", $2) - $NF = $NF")\"" - } - - rewrite_echo_line() - if (next_line ~ /^[[:space:]]+exit ;;.+/) - sub(/^[[:space:]]+exit ;;/, ";; ", next_line) - else - sub(/^[[:space:]]+exit ;;/, ";;", next_line) - print $0 - print Indent next_line - next -} - -In_main_case && /^esac/ { - In_main_case = 0 - - print # "esac" - - # Copy the rest of the input file - while (getline) print - nextfile -} - -{ print } diff --git a/patch-3.gawk b/patch-3.gawk deleted file mode 100755 index 7d4540d..0000000 --- a/patch-3.gawk +++ /dev/null @@ -1,99 +0,0 @@ -#!/usr/bin/gawk -f -# -*- Awk -*- - -# Automate removing unneeded quotes in variable assignments and factoring -# out some command substitutions in config.guess. - -# GPLv3+ - -BEGIN { - if (ARGC < 2) ARGV[ARGC++] = "config.guess" - - Indent = "" - In_here_doc = 0 - Factor = "BOGUS!REL" -} - -# Skip here documents -In_here_doc && $0 ~ /^[[:space:]]*EOF/ { In_here_doc = 0 } -In_here_doc { print; next } -/< 0; count--) ret = ret text - return ret -} diff --git a/patch-6.gawk b/patch-6.gawk deleted file mode 100755 index 19919d9..0000000 --- a/patch-6.gawk +++ /dev/null @@ -1,21 +0,0 @@ -#!/usr/bin/gawk -f -# -*- Awk -*- - -# Automate reversion of $( ) substitutions to classic `` form. - -# GPLv3+ - -BEGIN { - if (ARGC < 2) ARGV[ARGC++] = "config.guess" -} - -# fix a special case of forgotten quotes -/\$\(\$dummy\)/ { sub(/\$\(\$dummy\)/, "$(\"$dummy\")") } - -/\$\( \(/ { $0 = gensub(/\$\( (\([^()]+\)[^()]*)\)/, "`\\1`", "g") } -/\$\(/ { $0 = gensub(/\$\(([^()]+)\)/, "`\\1`", "g") } - -/\$\( \(.*'/ { $0 = gensub(/\$\( (\([^()]+'[^']+'[^()]*\)[^()]*)\)/, "`\\1`", "g") } -/\$\(.*'/ { $0 = gensub(/\$\(([^()]+'[^']+'[^()]*)\)/, "`\\1`", "g") } - -{ print }