Skip to content

Commit 042da42

Browse files
committed
scripts/setlocalversion: simplify the short version part
Reduce the indentation. Signed-off-by: Masahiro Yamada <masahiroy@kernel.org> Reviewed-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Reviewed-by: Nico Schottelius <nico-linuxsetlocalversion@schottelius.org>
1 parent 630ff0f commit 042da42

1 file changed

Lines changed: 3 additions & 5 deletions

File tree

‎scripts/setlocalversion‎

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -131,15 +131,13 @@ res="${res}${CONFIG_LOCALVERSION}${LOCALVERSION}"
131131
if test "$CONFIG_LOCALVERSION_AUTO" = "y"; then
132132
# full scm version string
133133
res="$res$(scm_version)"
134-
else
134+
elif [ -z "${LOCALVERSION}" ]; then
135135
# append a plus sign if the repository is not in a clean
136136
# annotated or signed tagged state (as git describe only
137137
# looks at signed or annotated tags - git tag -a/-s) and
138138
# LOCALVERSION= is not specified
139-
if test "${LOCALVERSION+set}" != "set"; then
140-
scm=$(scm_version --short)
141-
res="$res${scm:++}"
142-
fi
139+
scm=$(scm_version --short)
140+
res="$res${scm:++}"
143141
fi
144142

145143
echo "$res"

0 commit comments

Comments
 (0)