From: Dan Douglas <ormaaj@gmail.com>
To: gentoo-dev@lists.gentoo.org
Subject: Re: [gentoo-dev] Re: RFC: New eclass: mozlinguas.eclass
Date: Fri, 03 Feb 2012 16:14:35 -0600 [thread overview]
Message-ID: <2118153.jVE1AKz8Yi@smorgbox> (raw)
In-Reply-To: <CADqQcK7HfEEBeJwLYSRSJtm5JBLZ5SFBZt1Fn+xU5geZORkzQA@mail.gmail.com>
[-- Attachment #1: Type: text/plain, Size: 576 bytes --]
On Friday, February 03, 2012 10:14:42 PM Nirbheek Chauhan wrote:
> >> if [[ ${x} = en ]] || [[ ${x} = en-US ]]; then
> >
> > should be == imo
>
> Fixed
I prefer == for [[ too, but no difference. = is required for [ by POSIX but
Bash allows either (bad though). The real issue is executing two commands
since [[ can short-circuit and works as you expect. Two are only needed with [
because -a and -o are so unpredictable.
[[ $x == en || $x == en-US ]]
or
case $x in en|en-US) ...;; esac;
or
[[ $x == @(en|en-US) ]]
or
[[ $x == en?(-US) ]]
--
Dan Douglas
[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 198 bytes --]
prev parent reply other threads:[~2012-02-03 22:17 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-02-01 19:25 [gentoo-dev] RFC: New eclass: mozlinguas.eclass Nirbheek Chauhan
2012-02-01 20:14 ` [gentoo-dev] " Nirbheek Chauhan
2012-02-03 8:28 ` Gilles Dartiguelongue
2012-02-03 9:56 ` Mike Frysinger
2012-02-03 16:44 ` Nirbheek Chauhan
2012-02-03 19:27 ` Mike Frysinger
2012-02-03 22:10 ` Nirbheek Chauhan
2012-02-03 22:14 ` Dan Douglas [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=2118153.jVE1AKz8Yi@smorgbox \
--to=ormaaj@gmail.com \
--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