Gentoo Archives: gentoo-portage-dev

From: "Michał Górny" <mgorny@g.o>
To: gentoo-portage-dev@l.g.o
Cc: "Michał Górny" <mgorny@g.o>
Subject: [gentoo-portage-dev] [PATCH 1/6] econf: Replace unnecessary 'case' statements with 'if's
Date: Mon, 18 Aug 2014 17:51:06
Message-Id: 1408384301-14588-2-git-send-email-mgorny@gentoo.org
In Reply to: [gentoo-portage-dev] [PATCHES] Random issues and refactoring before EAPI6 series by "Michał Górny"
1 Replace the 'case' statements used to match 'configure' output with
2 simpler pattern-matching 'if's.
3
4 Acked-by: Alexander Berntsen <bernalex@g.o>
5 ---
6 bin/phase-helpers.sh | 16 ++++++----------
7 1 file changed, 6 insertions(+), 10 deletions(-)
8
9 diff --git a/bin/phase-helpers.sh b/bin/phase-helpers.sh
10 index 47bd843..6a5ce85 100644
11 --- a/bin/phase-helpers.sh
12 +++ b/bin/phase-helpers.sh
13 @@ -525,19 +525,15 @@ econf() {
14 local conf_help=$("${ECONF_SOURCE}/configure" --help 2>/dev/null)
15
16 if ___eapi_econf_passes_--disable-dependency-tracking; then
17 - case "${conf_help}" in
18 - *--disable-dependency-tracking*)
19 - set -- --disable-dependency-tracking "$@"
20 - ;;
21 - esac
22 + if [[ ${conf_help} == *--disable-dependency-tracking* ]]; then
23 + set -- --disable-dependency-tracking "$@"
24 + fi
25 fi
26
27 if ___eapi_econf_passes_--disable-silent-rules; then
28 - case "${conf_help}" in
29 - *--disable-silent-rules*)
30 - set -- --disable-silent-rules "$@"
31 - ;;
32 - esac
33 + if [[ ${conf_help} == *--disable-silent-rules* ]]; then
34 + set -- --disable-silent-rules "$@"
35 + fi
36 fi
37 fi
38
39 --
40 2.0.4