summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRandy Dunlap <rdunlap@infradead.org>2019-10-05 18:01:59 +0300
committerMasahiro Yamada <yamada.masahiro@socionext.com>2019-10-15 17:45:07 +0300
commit991b78fbd2231175293bd1d7c0768fb4e4382e14 (patch)
tree3435a590fa006446227ea7723bda0370f548b132
parent85f0ae7e435afb261af33f9a605b973c0c8c1139 (diff)
downloadlinux-991b78fbd2231175293bd1d7c0768fb4e4382e14.tar.xz
scripts: setlocalversion: fix a bashism
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> Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
-rwxr-xr-xscripts/setlocalversion2
1 files changed, 1 insertions, 1 deletions
diff --git a/scripts/setlocalversion b/scripts/setlocalversion
index 220dae0db3f1..a2998b118ef9 100755
--- a/scripts/setlocalversion
+++ b/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