Gentoo Archives: gentoo-dev

From: Mike Frysinger <vapier@g.o>
To: gentoo-dev@l.g.o
Subject: Re: [gentoo-dev] Re: enhancement for doicon/newicon in eutils.eclass
Date: Fri, 01 Jun 2012 22:50:25
Message-Id: 201206011849.39133.vapier@gentoo.org
In Reply to: [gentoo-dev] Re: enhancement for doicon/newicon in eutils.eclass by hasufell
1 On Wednesday 23 May 2012 21:04:42 hasufell wrote:
2 > # @FUNCTION: _iconins
3 > # @DESCRIPTION:
4 > # function for use in doicon and newicon
5
6 mark it @INTERNAL
7
8 > if [[ -z $size ]] ; then
9
10 ${size}
11
12 > if [[ $function == doicon ]] ; then
13
14 ${function}
15
16 > if [[ $function == newicon ]] ; then
17
18 ${function}
19
20 > doicon() {
21 > local function=$FUNCNAME
22 > _iconins "$@"
23
24 passing the funcname in this way is kind of ugly. you could do:
25 _iconins ${FUNCNAME} "$@"
26
27 and then at the top of _iconins:
28 local funcname=$1; shift
29
30 i guess if we all agree this complication is useful, then fix the nits and
31 let's merge it
32 -mike

Attachments

File name MIME type
signature.asc application/pgp-signature

Replies