From: Eric Blake <eblake@redhat.com>
To: marcandre.lureau@redhat.com, qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH] configure: remove bashism (since 2010)
Date: Wed, 9 Dec 2015 19:51:13 -0700 [thread overview]
Message-ID: <5668E8A1.90705@redhat.com> (raw)
In-Reply-To: <1449708810-17891-1-git-send-email-marcandre.lureau@redhat.com>
[-- Attachment #1: Type: text/plain, Size: 996 bytes --]
On 12/09/2015 05:53 PM, marcandre.lureau@redhat.com wrote:
> From: Marc-André Lureau <marcandre.lureau@redhat.com>
>
> "type" is not POSIX shell, but a bashism. (found thanks to shellcheck)
NACK. 'type' is POSIX, and shellcheck is buggy.
http://pubs.opengroup.org/onlinepubs/9699919799/utilities/type.html
>
> Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
> ---
> configure | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/configure b/configure
> index ba57b3f..90eff82 100755
> --- a/configure
> +++ b/configure
> @@ -158,7 +158,7 @@ symlink() {
> # check whether a command is available to this shell (may be either an
> # executable or a builtin)
> has() {
> - type "$1" >/dev/null 2>&1
> + which "$1" >/dev/null 2>&1
Conversely, 'which' is _not_ POSIX, and therefore less portable than 'type'.
--
Eric Blake eblake redhat com +1-919-301-3266
Libvirt virtualization library http://libvirt.org
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 604 bytes --]
next prev parent reply other threads:[~2015-12-10 2:51 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-12-10 0:53 [Qemu-devel] [PATCH] configure: remove bashism (since 2010) marcandre.lureau
2015-12-10 0:57 ` Marc-André Lureau
2015-12-10 2:52 ` Eric Blake
2015-12-10 2:51 ` Eric Blake [this message]
2015-12-10 9:46 ` Marc-André Lureau
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=5668E8A1.90705@redhat.com \
--to=eblake@redhat.com \
--cc=marcandre.lureau@redhat.com \
--cc=qemu-devel@nongnu.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.