Commit 991b78fb authored by Randy Dunlap's avatar Randy Dunlap Committed by Masahiro Yamada

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: 38b3439d ("setlocalversion: update mercurial tag parsing")
Signed-off-by: default avatarRandy Dunlap <rdunlap@infradead.org>
Cc: Mike Crowe <mcrowe@zipitwireless.com>
Signed-off-by: default avatarMasahiro Yamada <yamada.masahiro@socionext.com>
parent 85f0ae7e
...@@ -93,7 +93,7 @@ scm_version() ...@@ -93,7 +93,7 @@ scm_version()
# Check for mercurial and a mercurial repo. # Check for mercurial and a mercurial repo.
if test -d .hg && hgid=`hg id 2>/dev/null`; then if test -d .hg && hgid=`hg id 2>/dev/null`; then
# Do we have an tagged version? If so, latesttagdistance == 1 # 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}'` id=`hg log -r . --template '{latesttag}'`
printf '%s%s' -hg "$id" printf '%s%s' -hg "$id"
else else
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment