On 07/23/2014 04:21 AM, Felix von Leitner wrote:
> Public bug reported:
> 
> hxtool (part of the early build process) is a bash script.  Running it
> with /bin/sh yields a syntax error on line 10:
> 
>  10             STEXI*|ETEXI*|SQMP*|EQMP*) flag=$(($flag^1))
> 
> $(( expr )) is a bash extension, not part of /bin/sh.

Wrong.  $(( expr )) is mandated by POSIX.  What system are you on where
/bin/sh is not POSIX?  (Solaris is the only platform where /bin/sh does
not try to be POSIX-compliant, but who uses that for qemu?)

What is the actual syntax error you are seeing?  Is this a bug in dash
on your distribution?  I can't get dash to fail for me on Fedora:

$ dash -c 'f=1; f=$(($f^1)); echo $f'
0
$ dash -n scripts/hxtool; echo $?
0

-- 
Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature

Reply via email to