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/2] econf: Replace unnecessary 'case' statements with 'if's
Date: Sun, 17 Aug 2014 17:59:47
Message-Id: 1408298422-8657-1-git-send-email-mgorny@gentoo.org
1 Replace the 'case' statements used to match 'configure' output with
2 simpler pattern-matching 'if's.
3 ---
4 bin/phase-helpers.sh | 16 ++++++----------
5 1 file changed, 6 insertions(+), 10 deletions(-)
6
7 diff --git a/bin/phase-helpers.sh b/bin/phase-helpers.sh
8 index 47bd843..6a5ce85 100644
9 --- a/bin/phase-helpers.sh
10 +++ b/bin/phase-helpers.sh
11 @@ -525,19 +525,15 @@ econf() {
12 local conf_help=$("${ECONF_SOURCE}/configure" --help 2>/dev/null)
13
14 if ___eapi_econf_passes_--disable-dependency-tracking; then
15 - case "${conf_help}" in
16 - *--disable-dependency-tracking*)
17 - set -- --disable-dependency-tracking "$@"
18 - ;;
19 - esac
20 + if [[ ${conf_help} == *--disable-dependency-tracking* ]]; then
21 + set -- --disable-dependency-tracking "$@"
22 + fi
23 fi
24
25 if ___eapi_econf_passes_--disable-silent-rules; then
26 - case "${conf_help}" in
27 - *--disable-silent-rules*)
28 - set -- --disable-silent-rules "$@"
29 - ;;
30 - esac
31 + if [[ ${conf_help} == *--disable-silent-rules* ]]; then
32 + set -- --disable-silent-rules "$@"
33 + fi
34 fi
35 fi
36
37 --
38 2.0.4

Replies