aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/scripts/setlocalversion
diff options
context:
space:
mode:
authorMasahiro Yamada <masahiroy@kernel.org>2023-01-22 23:14:22 +0900
committerMasahiro Yamada <masahiroy@kernel.org>2023-02-05 18:34:11 +0900
commit992ebfab2a75c276fe27f7fd7a3fb326ccd7225b (patch)
tree6643f6c2df2446837f294d02414c7e3e035d714a /scripts/setlocalversion
parentkbuild: do not put .scmversion into the source tarball (diff)
downloadwireguard-linux-992ebfab2a75c276fe27f7fd7a3fb326ccd7225b.tar.xz
wireguard-linux-992ebfab2a75c276fe27f7fd7a3fb326ccd7225b.zip
setlocalversion: simplify the construction of the short version
With the --short option given, scm_version() prints "+". Just append it. Signed-off-by: Masahiro Yamada <masahiroy@kernel.org> Reviewed-by: Nicolas Schier <nicolas@fjasle.eu>
Diffstat (limited to 'scripts/setlocalversion')
-rwxr-xr-xscripts/setlocalversion3
1 files changed, 1 insertions, 2 deletions
diff --git a/scripts/setlocalversion b/scripts/setlocalversion
index 3b31702b4a4a..5cdf409204aa 100755
--- a/scripts/setlocalversion
+++ b/scripts/setlocalversion
@@ -121,8 +121,7 @@ elif [ "${LOCALVERSION+set}" != "set" ]; then
#
# If the variable LOCALVERSION is set (including being set
# to an empty string), we don't want to append a plus sign.
- scm=$(scm_version --short)
- res="$res${scm:++}"
+ res="$res$(scm_version --short)"
fi
echo "$res"