From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:33629) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a6rKG-0006gK-P7 for qemu-devel@nongnu.org; Wed, 09 Dec 2015 21:51:25 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1a6rKC-0003Zr-K1 for qemu-devel@nongnu.org; Wed, 09 Dec 2015 21:51:24 -0500 Received: from mx1.redhat.com ([209.132.183.28]:43078) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a6rKC-0003Zg-E4 for qemu-devel@nongnu.org; Wed, 09 Dec 2015 21:51:20 -0500 Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by mx1.redhat.com (Postfix) with ESMTPS id C2FA767C20 for ; Thu, 10 Dec 2015 02:51:18 +0000 (UTC) References: <1449708810-17891-1-git-send-email-marcandre.lureau@redhat.com> From: Eric Blake Message-ID: <5668E8A1.90705@redhat.com> Date: Wed, 9 Dec 2015 19:51:13 -0700 MIME-Version: 1.0 In-Reply-To: <1449708810-17891-1-git-send-email-marcandre.lureau@redhat.com> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="fjh54ixJHR1c6d6g1UjAXVK3j7fNvp78H" Subject: Re: [Qemu-devel] [PATCH] configure: remove bashism (since 2010) List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: marcandre.lureau@redhat.com, qemu-devel@nongnu.org This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --fjh54ixJHR1c6d6g1UjAXVK3j7fNvp78H Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 12/09/2015 05:53 PM, marcandre.lureau@redhat.com wrote: > From: Marc-Andr=C3=A9 Lureau >=20 > "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 >=20 > Signed-off-by: Marc-Andr=C3=A9 Lureau > --- > configure | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) >=20 > 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 'typ= e'. --=20 Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org --fjh54ixJHR1c6d6g1UjAXVK3j7fNvp78H Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 Comment: Public key at http://people.redhat.com/eblake/eblake.gpg Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQEcBAEBCAAGBQJWaOiiAAoJEKeha0olJ0NqMz4H/R/xYtUQhZOvfa0Rgk/qPjp/ 5IUo7g3KaAv7wmvYuzJiSnlBbFuR5F98tuj9DPIFMRfw335iUfzbB6j4C6xg0jEL 7a1Mc3HhOZQiLXqrPpTlJtR/elRjEbrxwfuHQMzKHoSdi6TKZVW5TEc9VjZRbNyM 8ArqqiZivizb6ahY21M9HwLpACShjosIFKZBirqrc54iJT5BkHv5Yn1IMIab/q5g GOImwdTVNNQkxit6xzb3YI0dWamC6zeYpY6xxqmKqRj1qDffg76VDYUGvakxL19E Udt41QYNl/ShHXiEfB9dvL12ZpEjo90fCA1TF9XfNslGSw345AcagsbutD1EhpY= =T2gu -----END PGP SIGNATURE----- --fjh54ixJHR1c6d6g1UjAXVK3j7fNvp78H--