Gentoo Archives: gentoo-dev

From: hasufell <hasufell@g.o>
To: gentoo-dev@l.g.o
Subject: Re: [gentoo-dev] enhancement for doicon/newicon in eutils.eclass
Date: Thu, 24 May 2012 00:47:24
Message-Id: 4FBD8443.8080008@gentoo.org
In Reply to: Re: [gentoo-dev] enhancement for doicon/newicon in eutils.eclass by Mike Frysinger
-----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-----

Replies

Subject Author
Re: [gentoo-dev] enhancement for doicon/newicon in eutils.eclass "Michał Górny" <mgorny@g.o>