[libvirt] [PATCH] autobuild.sh: avoid bashism
Eric Blake
eblake at redhat.com
Fri Jun 4 16:06:47 UTC 2010
On 06/04/2010 09:49 AM, Matthias Bolte wrote:
>>
>> -set -o pipefail
>> -make check 2>&1 | tee "$RESULTS"
>> -make syntax-check 2>&1 | tee -a "$RESULTS"
>> +# set -o pipefail is a bashism; this use of exec is the POSIX alternative
>> +exec 3>&1
>> +st=$(
>> + exec 4>&1 >&3
>> + { make check syntax-check 2>&1; echo $? >&4; } \
>> + | tee "$RESULTS"
>> +)
Technically, to be identical to the earlier version, I would have to use:
st=$(
exec 4>&1 >&3 3>&-
{ make check syntax-check 2>&1 4>&-; echo $? >&4; } \
| tee "$RESULTS" 4>&-
)
but leaking fd 3 and 4 to make and tee didn't bother me.
>
> ACK, tested and verified that it fixes the problem.
Thanks; pushed.
--
Eric Blake eblake at redhat.com +1-801-349-2682
Libvirt virtualization library http://libvirt.org
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 619 bytes
Desc: OpenPGP digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20100604/e85fe2e6/attachment-0001.sig>
More information about the libvir-list
mailing list