Gentoo Archives: gentoo-commits

From: Mike Frysinger <vapier@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] proj/autotools-wrappers:main commit in: /
Date: Sun, 30 Jan 2022 09:24:28
Message-Id: 1643532633.e7f61c009a39e1698e6a6b568647decb6ad17830.vapier@gentoo
1 commit: e7f61c009a39e1698e6a6b568647decb6ad17830
2 Author: Mike Frysinger <vapier <AT> gentoo <DOT> org>
3 AuthorDate: Sun Jan 30 08:50:33 2022 +0000
4 Commit: Mike Frysinger <vapier <AT> gentoo <DOT> org>
5 CommitDate: Sun Jan 30 08:50:33 2022 +0000
6 URL: https://gitweb.gentoo.org/proj/autotools-wrappers.git/commit/?id=e7f61c00
7
8 harmonize wrappers a little
9
10 Try to use variables to hold the tool name to reduce the differences
11 between the scripts. Hopefully this will make it a little easier to
12 keep the two in sync.
13
14 Signed-off-by: Mike Frysinger <vapier <AT> gentoo.org>
15
16 ac-wrapper.sh | 8 +++++---
17 am-wrapper.sh | 8 +++++---
18 2 files changed, 10 insertions(+), 6 deletions(-)
19
20 diff --git a/ac-wrapper.sh b/ac-wrapper.sh
21 index 4471f30..ce576c6 100755
22 --- a/ac-wrapper.sh
23 +++ b/ac-wrapper.sh
24 @@ -1,7 +1,9 @@
25 #!/bin/sh
26 -# Copyright 1999-2021 Gentoo Authors
27 +# Copyright 1999-2022 Gentoo Authors
28 # Distributed under the terms of the GNU General Public License v2
29
30 +NAME="autoconf"
31 +
32 # Based on the ac-wrapper.pl script provided by MandrakeSoft
33 # Rewritten in bash by Gregorio Guidi
34 #
35 @@ -126,7 +128,7 @@ if [ -z "${binary}" ] && [ -n "${WANT_AUTOCONF}" ] ; then
36 fi
37
38 if [ -z "${binary}" ] ; then
39 - err "Unable to locate any usuable version of autoconf.\n" \
40 + err "Unable to locate any usuable version of ${NAME}.\n" \
41 "\tI tried these versions:${all_vers}\n" \
42 "\tWith a base name of '${full_argv0}'."
43 fi
44 @@ -216,7 +218,7 @@ export WANT_AUTOCONF="${binary_ver}"
45 if [ ! -x "${binary}" ] ; then
46 # this shouldn't happen
47 err "${binary} is missing or not executable.\n" \
48 - "\tPlease try installing the correct version of autoconf."
49 + "\tPlease try installing the correct version of ${NAME}."
50 fi
51
52 exec "${binary}" "$@"
53
54 diff --git a/am-wrapper.sh b/am-wrapper.sh
55 index 2907626..492292c 100755
56 --- a/am-wrapper.sh
57 +++ b/am-wrapper.sh
58 @@ -1,7 +1,9 @@
59 #!/bin/sh
60 -# Copyright 1999-2018 Gentoo Foundation
61 +# Copyright 1999-2022 Gentoo Authors
62 # Distributed under the terms of the GNU General Public License v2
63
64 +NAME="automake"
65 +
66 # Executes the correct automake version.
67 #
68 # If WANT_AUTOMAKE is set (can be a whitespace delimited list of versions):
69 @@ -116,7 +118,7 @@ if [ -z "${binary}" ] && [ -n "${WANT_AUTOMAKE}" ] ; then
70 fi
71
72 if [ -z "${binary}" ] ; then
73 - err "Unable to locate any usuable version of automake.\n" \
74 + err "Unable to locate any usuable version of ${NAME}.\n" \
75 "\tI tried these versions:${all_vers}\n" \
76 "\tWith a base name of '${full_argv0}'."
77 fi
78 @@ -179,7 +181,7 @@ export WANT_AUTOMAKE="${binary_ver}"
79 if [ ! -x "${binary}" ] ; then
80 # this shouldn't happen
81 err "${binary} is missing or not executable.\n" \
82 - "\tPlease try installing the correct version of automake."
83 + "\tPlease try installing the correct version of ${NAME}."
84 fi
85
86 exec "${binary}" "$@"