On Mon, May 21, 2012 at 1:30 AM, hasufell <hasuf...@gentoo.org> wrote: > On 05/21/2012 02:01 AM, Jonathan Callen wrote: >> On 05/20/2012 07:49 PM, hasufell wrote: >>> On 05/21/2012 01:36 AM, Alexis Ballier wrote: >>>> On Mon, 21 May 2012 01:24:13 +0200 hasufell >>>> <hasuf...@gentoo.org> wrote: >>>> >>>>> I want support for installing icons into the appropriate >>>>> directories which are under /usr/share/icons/... and not >>>>> just pixmaps. >>>>> >>>>> proposal attached + diff >>>>> >>>>> This should not break existing ebuilds. Tested a bit and >>>>> open for review now. >>>> >>>> maybe i missed something but cant you just make doicon a >>>> newicon wrapper and remove all that code duplication ? >>>> >> >>> I don't see how. "doicon" supports installing multiple icons >>> with one command, as well as directories. That does not work for >>> "newicon". >> >> >> >> Normally, new* is a wrapper for do* that does something like: >> >> newfoo() { # argument checking omitted... cp -P "${1}" "${T}/${2}" >> dofoo "${T}/${2}" } >> >> > > That does not use "newins" like the old function. Why would I want to > change that? >
An alternative would be to factor the common code into a third function, and call that from doicon and newicon.