Skip to content

Commit

Permalink
scripts/setlocalversion: simplify the short version part
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Masahiro Yamada committed May 26, 2021
1 parent 630ff0f commit 042da42
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions scripts/setlocalversion
Original file line number Diff line number Diff line change
Expand Up @@ -131,15 +131,13 @@ res="${res}${CONFIG_LOCALVERSION}${LOCALVERSION}"
if test "$CONFIG_LOCALVERSION_AUTO" = "y"; then
# full scm version string
res="$res$(scm_version)"
else
elif [ -z "${LOCALVERSION}" ]; then
# append a plus sign if the repository is not in a clean
# annotated or signed tagged state (as git describe only
# looks at signed or annotated tags - git tag -a/-s) and
# LOCALVERSION= is not specified
if test "${LOCALVERSION+set}" != "set"; then
scm=$(scm_version --short)
res="$res${scm:++}"
fi
scm=$(scm_version --short)
res="$res${scm:++}"
fi

echo "$res"

0 comments on commit 042da42

Please sign in to comment.