qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH v2 4/4] build: don't fail if given a git submodu


From: Eric Blake
Subject: Re: [Qemu-devel] [PATCH v2 4/4] build: don't fail if given a git submodule which does not exist
Date: Sat, 28 Oct 2017 07:58:37 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.4.0

On 10/28/2017 03:27 AM, Alexey Kardashevskiy wrote:
> On 28/10/17 00:14, Daniel P. Berrange wrote:
>> If going back in time in git history, across a commit that introduces a new
>> submodule, the 'git-submodule.sh' script will fail, causing rebuild to fail.
>>

>> +do
>> +    $GIT submodule status $m 1> /dev/null 2>&1
>> +    if test $? == 0
> 
> 
> ./scripts/git-submodule.sh: 29: test: 0: unexpected operator

Ah, right, == is a bashism.

> 
> This helps:
> 
> -    if test $? == 0
> +    if test "$?" -eq "0"

Or 'if test $? = 0'

-- 
Eric Blake, Principal Software Engineer
Red Hat, Inc.           +1-919-301-3266
Virtualization:  qemu.org | libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]