diff options
author | Mike Frysinger <vapier@gentoo.org> | 2022-01-30 03:50:33 -0500 |
---|---|---|
committer | Mike Frysinger <vapier@gentoo.org> | 2022-01-30 03:50:33 -0500 |
commit | e7f61c009a39e1698e6a6b568647decb6ad17830 (patch) | |
tree | cb07440f02e0e809d925fbe61a6db8a531686563 | |
parent | autoconf-wrapper: expand full version range only on demand (diff) | |
download | autotools-wrappers-e7f61c009a39e1698e6a6b568647decb6ad17830.tar.gz autotools-wrappers-e7f61c009a39e1698e6a6b568647decb6ad17830.tar.bz2 autotools-wrappers-e7f61c009a39e1698e6a6b568647decb6ad17830.zip |
harmonize wrappers a littleat-20220130
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@gentoo.org>
-rwxr-xr-x | ac-wrapper.sh | 8 | ||||
-rwxr-xr-x | 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}" "$@" |