From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from pigeon.gentoo.org ([208.92.234.80] helo=lists.gentoo.org) by finch.gentoo.org with esmtp (Exim 4.60) (envelope-from ) id 1SXMD6-0000oK-Cp for garchives@archives.gentoo.org; Thu, 24 May 2012 00:47:24 +0000 Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 67704E06D9; Thu, 24 May 2012 00:47:06 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) by pigeon.gentoo.org (Postfix) with ESMTP id EF1B9E050C for ; Thu, 24 May 2012 00:46:17 +0000 (UTC) Received: from [192.168.4.5] (blfd-5d8229f1.pool.mediaWays.net [93.130.41.241]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) (Authenticated sender: hasufell) by smtp.gentoo.org (Postfix) with ESMTPSA id 1A2021B4020 for ; Thu, 24 May 2012 00:46:16 +0000 (UTC) Message-ID: <4FBD8443.8080008@gentoo.org> Date: Thu, 24 May 2012 02:43:47 +0200 From: hasufell User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:10.0.4) Gecko/20120502 Thunderbird/10.0.4 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 MIME-Version: 1.0 To: gentoo-dev@lists.gentoo.org Subject: Re: [gentoo-dev] enhancement for doicon/newicon in eutils.eclass References: <4FB97D1D.9070004@gentoo.org> <201205212249.40692.vapier@gentoo.org> <4FBD7DCC.1010607@gentoo.org> <201205232030.52446.vapier@gentoo.org> In-Reply-To: <201205232030.52446.vapier@gentoo.org> X-Enigmail-Version: 1.3.5 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Archives-Salt: c27254f0-618b-452e-ada9-c5a9cc23868a X-Archives-Hash: 119e65cff027784d15d7832c008e60e0 -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On 05/24/2012 02:30 AM, Mike Frysinger wrote: > On Wednesday 23 May 2012 20:16:12 hasufell wrote: >> Thanks, I'v implemented most of that, but your proposal about >> non-duplicated list in case) has multiple problems. The only >> cases that actually work with that snippet are: >> 16x16|22x22|24x24|32x32|36x36|48x48|64x64|72x72|96x96|scalable. >> All others will fail (like 128x128 or just 48). > > so do: size= if [[ $2 == "scalable" ]] ; then size=$2 elif [[ > ${2%%x*}x${2%%x*} == "$2" ]] ; then size=${2%%x*} case ${size} in > 16|22|24|32|36|48|64|72|96|128|192|256) ;; *) size= ;; esac fi > -mike alright this would work -s|--size) if [[ ${2%%x*}x${2%%x*} == "$2" ]] ; then size=${2%%x*} else size=${2} fi case ${size} in 16|22|24|32|36|48|64|72|96|128|192|256) size=${size}x${size};; scalable) ;; *) eerror "${size} is an unsupported icon size!" exit 1;; esac shift 2;; -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.19 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iQEcBAEBAgAGBQJPvYRDAAoJEFpvPKfnPDWz8DgIAIA3T7GLWeN1m+8vfyeaVMXj 7UWyBXEcCU5geYqi5KsuY8/0Mq0e47ER+EH3VU+CrbV+UlDxxbyzsF4cqMRq/Oe+ Zz5CmSv4vjAfOyVe9psChue9PnKQwe/w6sS+L9zBftIzCb8G48Eefiir7lp9p7HO 9M5KkLeJwThDkUfhNUKtbNdIf1clnT1GVNrvcPuuasARN/of4ClQVVRISXKKHZen 9yA4D876CxtyN0jBHn78pRg0kZwSPL3PqucIQjli+usvGONX+LWuc7uWFJk8hnHI E9cJrbUvkSJZx07ajEK1maohJBkfZdVWWxCGtZk0T00Kd2Nyy7o9SFX1hXX3F4I= =/kaW -----END PGP SIGNATURE-----