From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id CF940139694 for ; Mon, 17 Apr 2017 22:01:10 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id CD17121C1D6; Mon, 17 Apr 2017 21:54:45 +0000 (UTC) Received: from smtp.gentoo.org (woodpecker.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 8FCA121C1C9 for ; Mon, 17 Apr 2017 21:54:40 +0000 (UTC) Received: from symphony.aura-online.co.uk (154.189.187.81.in-addr.arpa [81.187.189.154]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: chewi) by smtp.gentoo.org (Postfix) with ESMTPSA id 1A3F9341301; Mon, 17 Apr 2017 21:54:38 +0000 (UTC) From: James Le Cuirot To: gentoo-dev Cc: James Le Cuirot Subject: [gentoo-dev] [PATCH 06/14] cdrom.eclass: Simplify loop with seq Date: Mon, 17 Apr 2017 22:53:51 +0100 Message-Id: <20170417215359.30641-7-chewi@gentoo.org> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20170417215359.30641-1-chewi@gentoo.org> References: <20170417215359.30641-1-chewi@gentoo.org> Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-dev@lists.gentoo.org Reply-to: gentoo-dev@lists.gentoo.org X-Archives-Salt: ac35eb30-67b1-4c3d-8ef0-945da984918e X-Archives-Hash: 309471ed29cfd440bdf080faf6dc55b1 --- eclass/cdrom.eclass | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/eclass/cdrom.eclass b/eclass/cdrom.eclass index 681683f9328c..b8fdb03ac535 100644 --- a/eclass/cdrom.eclass +++ b/eclass/cdrom.eclass @@ -104,10 +104,9 @@ cdrom_get_cds() { else _cdrom_set_names einfo "This package will need access to ${CDROM_TOTAL_CDS} cds." - cdcnt=0 - while [[ ${cdcnt} -lt ${CDROM_TOTAL_CDS} ]] ; do - ((++cdcnt)) - var="CDROM_NAME_${cdcnt}" + local cdcnt + for cdcnt in $(seq ${#}); do + local var=CDROM_NAME_${cdcnt} [[ ! -z ${!var} ]] && einfo " CD ${cdcnt}: ${!var}" done echo -- 2.11.0