public inbox for gentoo-dev@lists.gentoo.org
 help / color / mirror / Atom feed
From: Ulrich Mueller <ulm@gentoo.org>
To: gentoo-dev@lists.gentoo.org
Subject: [gentoo-dev] Re: Changes to make_desktop_entry in eutils.eclass
Date: Wed, 24 Feb 2010 21:11:03 +0100	[thread overview]
Message-ID: <19333.34775.95287.606410@a1i15.kph.uni-mainz.de> (raw)
In-Reply-To: <4B8583CC.3050507@gentoo.org>

>>>>> On Wed, 24 Feb 2010, Jonathan Callen wrote:

> +	# Don't append another ";" when a valid category value is provided.
> +	[[ -n ${type} && ${type} != *';' ]] && type+=";"

This can be shortened to:

    [[ -n ${type} ]] && type="${type%;};"

or even shorter:

    type="${type%;}${type:+;}"

Ulrich



      parent reply	other threads:[~2010-02-24 20:11 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-02-24  1:26 [gentoo-dev] Changes to make_desktop_entry in eutils.eclass Jonathan Callen
2010-02-24 18:16 ` Pacho Ramos
2010-02-24 18:40   ` Ulrich Mueller
2010-02-24 18:53     ` Samuli Suominen
2010-02-24 18:55     ` Pacho Ramos
2010-02-24 18:57       ` Pacho Ramos
2010-02-24 19:33       ` Ulrich Mueller
2010-02-24 19:44         ` Pacho Ramos
2010-02-24 19:53   ` [gentoo-dev] " Jonathan Callen
2010-02-24 20:00     ` Pacho Ramos
2010-02-24 20:11     ` Ulrich Mueller [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=19333.34775.95287.606410@a1i15.kph.uni-mainz.de \
    --to=ulm@gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox