[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CAK7LNARCzEQNAJa1-ub6Ga1VcC6pQHtqc8P1dutscyfQZFzTmQ@mail.gmail.com>
Date: Tue, 8 Oct 2019 01:11:39 +0900
From: Masahiro Yamada <yamada.masahiro@...ionext.com>
To: Randy Dunlap <rdunlap@...radead.org>
Cc: linux-kbuild <linux-kbuild@...r.kernel.org>,
Mike Crowe <mcrowe@...itwireless.com>,
LKML <linux-kernel@...r.kernel.org>,
Sam Ravnborg <sam@...nborg.org>
Subject: Re: [PATCH] scripts: setlocalversion: fix a bashism
On Sun, Oct 6, 2019 at 12:02 AM Randy Dunlap <rdunlap@...radead.org> wrote:
>
> From: Randy Dunlap <rdunlap@...radead.org>
>
> Fix bashism reported by checkbashisms by using only one '=':
>
> possible bashism in scripts/setlocalversion line 96 (should be 'b = a'):
> if [ "`hg log -r . --template '{latesttagdistance}'`" == "1" ]; then
>
> Fixes: 38b3439d84f4 ("setlocalversion: update mercurial tag parsing")
> Signed-off-by: Randy Dunlap <rdunlap@...radead.org>
> Cc: Mike Crowe <mcrowe@...itwireless.com>
Applied to linux-kbuild. Thanks.
> ---
> Does anyone still use hg for kernel development?
I have also been wondering in which situation
this code is used...
>
> scripts/setlocalversion | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> --- lnx-54-rc1.orig/scripts/setlocalversion
> +++ lnx-54-rc1/scripts/setlocalversion
> @@ -93,7 +93,7 @@ scm_version()
> # Check for mercurial and a mercurial repo.
> if test -d .hg && hgid=`hg id 2>/dev/null`; then
> # Do we have an tagged version? If so, latesttagdistance == 1
> - if [ "`hg log -r . --template '{latesttagdistance}'`" == "1" ]; then
> + if [ "`hg log -r . --template '{latesttagdistance}'`" = "1" ]; then
> id=`hg log -r . --template '{latesttag}'`
> printf '%s%s' -hg "$id"
> else
>
--
Best Regards
Masahiro Yamada
Powered by blists - more mailing lists