Gentoo Archives: gentoo-dev

From: Ulrich Mueller <ulm@g.o>
To: gentoo-dev@l.g.o
Subject: [gentoo-dev] Re: Changes to make_desktop_entry in eutils.eclass
Date: Wed, 24 Feb 2010 20:11:22
Message-Id: 19333.34775.95287.606410@a1i15.kph.uni-mainz.de
In Reply to: [gentoo-dev] Re: Changes to make_desktop_entry in eutils.eclass by Jonathan Callen
1 >>>>> On Wed, 24 Feb 2010, Jonathan Callen wrote:
2
3 > + # Don't append another ";" when a valid category value is provided.
4 > + [[ -n ${type} && ${type} != *';' ]] && type+=";"
5
6 This can be shortened to:
7
8 [[ -n ${type} ]] && type="${type%;};"
9
10 or even shorter:
11
12 type="${type%;}${type:+;}"
13
14 Ulrich