From b9cb0d6be23defe1ffc91dbe4e6edbcecd34c27d Mon Sep 17 00:00:00 2001 From: Mike Frysinger Date: Mon, 17 Oct 2011 19:14:14 +0000 Subject: [PATCH] simplify get_abi_var logic a bit --- eclass/multilib.eclass | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-) diff --git a/eclass/multilib.eclass b/eclass/multilib.eclass index 656a36fc69d1..d56c0b9efc2c 100644 --- a/eclass/multilib.eclass +++ b/eclass/multilib.eclass @@ -1,6 +1,6 @@ # Copyright 1999-2011 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/eclass/multilib.eclass,v 1.93 2011/10/14 22:54:35 vapier Exp $ +# $Header: /var/cvsroot/gentoo-x86/eclass/multilib.eclass,v 1.94 2011/10/17 19:14:14 vapier Exp $ # @ECLASS: multilib.eclass # @MAINTAINER: @@ -73,17 +73,7 @@ get_libdir() { # If is not specified and ${ABI} and ${DEFAULT_ABI} are not defined, we return an empty string. get_abi_var() { local flag=$1 - local abi - if [ $# -gt 1 ]; then - abi=${2} - elif [ -n "${ABI}" ]; then - abi=${ABI} - elif [ -n "${DEFAULT_ABI}" ]; then - abi=${DEFAULT_ABI} - else - abi="default" - fi - + local abi=${2:-${ABI:-${DEFAULT_ABI:-default}}} local var="${flag}_${abi}" echo ${!var} } -- 2.26.2