From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) by finch.gentoo.org (Postfix) with ESMTP id 465B11381F3 for ; Sun, 18 Nov 2012 08:29:27 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id E1497E0020; Sun, 18 Nov 2012 08:29:19 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 67421E0020 for ; Sun, 18 Nov 2012 08:29:19 +0000 (UTC) Received: from flycatcher.gentoo.org (flycatcher.gentoo.org [81.93.255.6]) (using TLSv1 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 81C4533D7EE for ; Sun, 18 Nov 2012 08:29:18 +0000 (UTC) Received: by flycatcher.gentoo.org (Postfix, from userid 559) id 490CF20C65; Sun, 18 Nov 2012 08:29:17 +0000 (UTC) From: "Mike Frysinger (vapier)" To: gentoo-commits@lists.gentoo.org Reply-To: gentoo-dev@lists.gentoo.org, vapier@gentoo.org Subject: [gentoo-commits] gentoo-x86 commit in eclass: flag-o-matic.eclass X-VCS-Repository: gentoo-x86 X-VCS-Files: flag-o-matic.eclass X-VCS-Directories: eclass X-VCS-Committer: vapier X-VCS-Committer-Name: Mike Frysinger Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Message-Id: <20121118082917.490CF20C65@flycatcher.gentoo.org> Date: Sun, 18 Nov 2012 08:29:17 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Archives-Salt: 5cc191a8-37b9-4e80-bfbf-758ab6a8fa57 X-Archives-Hash: 11ee0b3a169cf7ce186b8b0131a77ca0 vapier 12/11/18 08:29:17 Modified: flag-o-matic.eclass Log: test-flags-PROG: use arrays to simplify code a bit Revision Changes Path 1.183 eclass/flag-o-matic.eclass file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/flag-o-matic.eclass?rev=1.183&view=markup plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/flag-o-matic.eclass?rev=1.183&content-type=text/plain diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/flag-o-matic.eclass?r1=1.182&r2=1.183 Index: flag-o-matic.eclass =================================================================== RCS file: /var/cvsroot/gentoo-x86/eclass/flag-o-matic.eclass,v retrieving revision 1.182 retrieving revision 1.183 diff -u -r1.182 -r1.183 --- flag-o-matic.eclass 18 Nov 2012 08:27:00 -0000 1.182 +++ flag-o-matic.eclass 18 Nov 2012 08:29:17 -0000 1.183 @@ -1,6 +1,6 @@ # Copyright 1999-2012 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/eclass/flag-o-matic.eclass,v 1.182 2012/11/18 08:27:00 vapier Exp $ +# $Header: /var/cvsroot/gentoo-x86/eclass/flag-o-matic.eclass,v 1.183 2012/11/18 08:29:17 vapier Exp $ # @ECLASS: flag-o-matic.eclass # @MAINTAINER: @@ -422,21 +422,21 @@ test-flags-PROG() { local comp=$1 - local flags + local flags=() local x shift [[ -z ${comp} ]] && return 1 - for x in "$@" ; do - test-flag-${comp} "${x}" && flags="${flags}${flags:+ }${x}" + for x ; do + test-flag-${comp} "${x}" && flags+=( "${x}" ) done - echo "${flags}" + echo "${flags[*]}" # Just bail if we dont have any flags - [[ -n ${flags} ]] + [[ ${#flags[@]} -gt 0 ]] } # @FUNCTION: test-flags-CC