diff mbox

configure: remove bashism

Message ID 1399030869-23399-1-git-send-email-mjt@msgid.tls.msk.ru
State New
Headers show

Commit Message

Michael Tokarev May 2, 2014, 11:41 a.m. UTC
Commit e26110cfc67d48 added a check for shacmd to create a hash
for modules.  This check in configure is using bash construct &>
to redirect both stdout and stderr, whcih does fun things on some
shells.  Get rid of it, use standard redirection instead.

Cc: Fam Zheng <famz@redhat.com>
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
---
 configure |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Fam Zheng May 4, 2014, 1:39 a.m. UTC | #1
On Fri, 05/02 15:41, Michael Tokarev wrote:
> Commit e26110cfc67d48 added a check for shacmd to create a hash
> for modules.  This check in configure is using bash construct &>
> to redirect both stdout and stderr, whcih does fun things on some

s/whcih/which

> shells.  Get rid of it, use standard redirection instead.
> 
> Cc: Fam Zheng <famz@redhat.com>
> Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
> ---
>  configure |    2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/configure b/configure
> index 2fbec59..7442790 100755
> --- a/configure
> +++ b/configure
> @@ -2627,7 +2627,7 @@ done
>  if test "$modules" = yes; then
>      shacmd_probe="sha1sum sha1 shasum"
>      for c in $shacmd_probe; do
> -        if which $c &>/dev/null; then
> +        if which $c >/dev/null 2>&1; then
>              shacmd="$c"
>              break
>          fi
> -- 
> 1.7.10.4
> 

Thanks. With the typo in commit message fixed,

Reviewed-by: Fam Zheng <famz@redhat.com>
Paolo Bonzini May 5, 2014, 2:10 p.m. UTC | #2
Il 02/05/2014 13:41, Michael Tokarev ha scritto:
> Commit e26110cfc67d48 added a check for shacmd to create a hash
> for modules.  This check in configure is using bash construct &>
> to redirect both stdout and stderr, whcih does fun things on some
> shells.  Get rid of it, use standard redirection instead.
>
> Cc: Fam Zheng <famz@redhat.com>
> Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
> ---
>  configure |    2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/configure b/configure
> index 2fbec59..7442790 100755
> --- a/configure
> +++ b/configure
> @@ -2627,7 +2627,7 @@ done
>  if test "$modules" = yes; then
>      shacmd_probe="sha1sum sha1 shasum"
>      for c in $shacmd_probe; do
> -        if which $c &>/dev/null; then
> +        if which $c >/dev/null 2>&1; then
>              shacmd="$c"
>              break
>          fi
>

Applied, and Cced qemu-stable too.
diff mbox

Patch

diff --git a/configure b/configure
index 2fbec59..7442790 100755
--- a/configure
+++ b/configure
@@ -2627,7 +2627,7 @@  done
 if test "$modules" = yes; then
     shacmd_probe="sha1sum sha1 shasum"
     for c in $shacmd_probe; do
-        if which $c &>/dev/null; then
+        if which $c >/dev/null 2>&1; then
             shacmd="$c"
             break
         fi