commit: 25e90d01d1021f7056ed3492a9fe44ed68d459d6
Author: Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Sun Aug 17 17:42:49 2014 +0000
Commit: Brian Dolbec <brian.dolbec <AT> gmail <DOT> com>
CommitDate: Thu Sep 11 23:44:25 2014 +0000
URL:
http://sources.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=25e90d01
econf: Replace unnecessary 'case' statements with 'if's
Replace the 'case' statements used to match 'configure' output with
simpler pattern-matching 'if's.
Acked-by: Alexander Berntsen <bernalex <AT> gentoo.org>
---
bin/phase-helpers.sh | 16 ++++++----------
1 file changed, 6 insertions(+), 10 deletions(-)
diff --git a/bin/phase-helpers.sh b/bin/phase-helpers.sh
index 02fcf3e..f0e298f 100644
--- a/bin/phase-helpers.sh
+++ b/bin/phase-helpers.sh
@@ -525,19 +525,15 @@ econf() {
local conf_help=$("${ECONF_SOURCE}/configure" --help
2>/dev/null)
if ___eapi_econf_passes_--disable-dependency-tracking;
then
- case "${conf_help}" in
- *--disable-dependency-tracking*)
- set --
--disable-dependency-tracking "$@"
- ;;
- esac
+ if [[ ${conf_help} ==
*--disable-dependency-tracking* ]]; then
+ set -- --disable-dependency-tracking
"$@"
+ fi
fi
if ___eapi_econf_passes_--disable-silent-rules; then
- case "${conf_help}" in
- *--disable-silent-rules*)
- set -- --disable-silent-rules
"$@"
- ;;
- esac
+ if [[ ${conf_help} == *--disable-silent-rules*
]]; then
+ set -- --disable-silent-rules "$@"
+ fi
fi
fi