* [PATCH] scripts: setlocalversion: fix a bashism
@ 2019-10-05 15:01 Randy Dunlap
2019-10-07 16:11 ` Masahiro Yamada
0 siblings, 1 reply; 2+ messages in thread
From: Randy Dunlap @ 2019-10-05 15:01 UTC (permalink / raw)
To: linux-kbuild, Masahiro Yamada; +Cc: Mike Crowe, LKML
From: Randy Dunlap <rdunlap@infradead.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@infradead.org>
Cc: Mike Crowe <mcrowe@zipitwireless.com>
---
Does anyone still use hg for kernel development?
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
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] scripts: setlocalversion: fix a bashism
2019-10-05 15:01 [PATCH] scripts: setlocalversion: fix a bashism Randy Dunlap
@ 2019-10-07 16:11 ` Masahiro Yamada
0 siblings, 0 replies; 2+ messages in thread
From: Masahiro Yamada @ 2019-10-07 16:11 UTC (permalink / raw)
To: Randy Dunlap; +Cc: linux-kbuild, Mike Crowe, LKML, Sam Ravnborg
On Sun, Oct 6, 2019 at 12:02 AM Randy Dunlap <rdunlap@infradead.org> wrote:
>
> From: Randy Dunlap <rdunlap@infradead.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@infradead.org>
> Cc: Mike Crowe <mcrowe@zipitwireless.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
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2019-10-07 16:12 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-10-05 15:01 [PATCH] scripts: setlocalversion: fix a bashism Randy Dunlap
2019-10-07 16:11 ` Masahiro Yamada
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.