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
1 -----BEGIN PGP SIGNED MESSAGE-----
2 Hash: SHA1
3
4 On 05/24/2012 02:30 AM, Mike Frysinger wrote:
5 > On Wednesday 23 May 2012 20:16:12 hasufell wrote:
6 >> Thanks, I'v implemented most of that, but your proposal about
7 >> non-duplicated list in case) has multiple problems. The only
8 >> cases that actually work with that snippet are:
9 >> 16x16|22x22|24x24|32x32|36x36|48x48|64x64|72x72|96x96|scalable.
10 >> All others will fail (like 128x128 or just 48).
11 >
12 > so do: size= if [[ $2 == "scalable" ]] ; then size=$2 elif [[
13 > ${2%%x*}x${2%%x*} == "$2" ]] ; then size=${2%%x*} case ${size} in
14 > 16|22|24|32|36|48|64|72|96|128|192|256) ;; *) size= ;; esac fi
15 > -mike
16
17 alright
18
19 this would work
20
21
22 -s|--size)
23 if [[ ${2%%x*}x${2%%x*} == "$2" ]] ; then
24 size=${2%%x*}
25 else
26 size=${2}
27 fi
28 case ${size} in
29 16|22|24|32|36|48|64|72|96|128|192|256)
30 size=${size}x${size};;
31 scalable)
32 ;;
33 *)
34 eerror "${size} is an unsupported icon size!"
35 exit 1;;
36 esac
37 shift 2;;
38
39 -----BEGIN PGP SIGNATURE-----
40 Version: GnuPG v2.0.19 (GNU/Linux)
41 Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
42
43 iQEcBAEBAgAGBQJPvYRDAAoJEFpvPKfnPDWz8DgIAIA3T7GLWeN1m+8vfyeaVMXj
44 7UWyBXEcCU5geYqi5KsuY8/0Mq0e47ER+EH3VU+CrbV+UlDxxbyzsF4cqMRq/Oe+
45 Zz5CmSv4vjAfOyVe9psChue9PnKQwe/w6sS+L9zBftIzCb8G48Eefiir7lp9p7HO
46 9M5KkLeJwThDkUfhNUKtbNdIf1clnT1GVNrvcPuuasARN/of4ClQVVRISXKKHZen
47 9yA4D876CxtyN0jBHn78pRg0kZwSPL3PqucIQjli+usvGONX+LWuc7uWFJk8hnHI
48 E9cJrbUvkSJZx07ajEK1maohJBkfZdVWWxCGtZk0T00Kd2Nyy7o9SFX1hXX3F4I=
49 =/kaW
50 -----END PGP SIGNATURE-----

Replies

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