commit:     e7f61c009a39e1698e6a6b568647decb6ad17830
Author:     Mike Frysinger <vapier <AT> gentoo <DOT> org>
AuthorDate: Sun Jan 30 08:50:33 2022 +0000
Commit:     Mike Frysinger <vapier <AT> gentoo <DOT> org>
CommitDate: Sun Jan 30 08:50:33 2022 +0000
URL:        
https://gitweb.gentoo.org/proj/autotools-wrappers.git/commit/?id=e7f61c00

harmonize wrappers a little

Try to use variables to hold the tool name to reduce the differences
between the scripts.  Hopefully this will make it a little easier to
keep the two in sync.

Signed-off-by: Mike Frysinger <vapier <AT> gentoo.org>

 ac-wrapper.sh | 8 +++++---
 am-wrapper.sh | 8 +++++---
 2 files changed, 10 insertions(+), 6 deletions(-)

diff --git a/ac-wrapper.sh b/ac-wrapper.sh
index 4471f30..ce576c6 100755
--- a/ac-wrapper.sh
+++ b/ac-wrapper.sh
@@ -1,7 +1,9 @@
 #!/bin/sh
-# Copyright 1999-2021 Gentoo Authors
+# Copyright 1999-2022 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
+NAME="autoconf"
+
 # Based on the ac-wrapper.pl script provided by MandrakeSoft
 # Rewritten in bash by Gregorio Guidi
 #
@@ -126,7 +128,7 @@ if [ -z "${binary}" ] && [ -n "${WANT_AUTOCONF}" ] ; then
 fi
 
 if [ -z "${binary}" ] ; then
-       err "Unable to locate any usuable version of autoconf.\n" \
+       err "Unable to locate any usuable version of ${NAME}.\n" \
            "\tI tried these versions:${all_vers}\n" \
            "\tWith a base name of '${full_argv0}'."
 fi
@@ -216,7 +218,7 @@ export WANT_AUTOCONF="${binary_ver}"
 if [ ! -x "${binary}" ] ; then
        # this shouldn't happen
        err "${binary} is missing or not executable.\n" \
-           "\tPlease try installing the correct version of autoconf."
+           "\tPlease try installing the correct version of ${NAME}."
 fi
 
 exec "${binary}" "$@"

diff --git a/am-wrapper.sh b/am-wrapper.sh
index 2907626..492292c 100755
--- a/am-wrapper.sh
+++ b/am-wrapper.sh
@@ -1,7 +1,9 @@
 #!/bin/sh
-# Copyright 1999-2018 Gentoo Foundation
+# Copyright 1999-2022 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
+NAME="automake"
+
 # Executes the correct automake version.
 #
 # If WANT_AUTOMAKE is set (can be a whitespace delimited list of versions):
@@ -116,7 +118,7 @@ if [ -z "${binary}" ] && [ -n "${WANT_AUTOMAKE}" ] ; then
 fi
 
 if [ -z "${binary}" ] ; then
-       err "Unable to locate any usuable version of automake.\n" \
+       err "Unable to locate any usuable version of ${NAME}.\n" \
            "\tI tried these versions:${all_vers}\n" \
            "\tWith a base name of '${full_argv0}'."
 fi
@@ -179,7 +181,7 @@ export WANT_AUTOMAKE="${binary_ver}"
 if [ ! -x "${binary}" ] ; then
        # this shouldn't happen
        err "${binary} is missing or not executable.\n" \
-           "\tPlease try installing the correct version of automake."
+           "\tPlease try installing the correct version of ${NAME}."
 fi
 
 exec "${binary}" "$@"

Reply via email to