Skip to content

Commit 992ebfa

Browse files
committed
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>
1 parent f6e09b0 commit 992ebfa

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

scripts/setlocalversion

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -121,8 +121,7 @@ elif [ "${LOCALVERSION+set}" != "set" ]; then
121121
#
122122
# If the variable LOCALVERSION is set (including being set
123123
# to an empty string), we don't want to append a plus sign.
124-
scm=$(scm_version --short)
125-
res="$res${scm:++}"
124+
res="$res$(scm_version --short)"
126125
fi
127126

128127
echo "$res"

0 commit comments

Comments
 (0)