History

scripts/setlocalversion: simplify the short version part

Reduce the indentation.

Masahiro Yamada committed 5 years ago

Commit 042da421 parent 630ff0f1 file · +3 −5Browse files

Showing the changes to scripts (1 of 1 file). Show all

Unified · Split

scripts/setlocalversion+3−5
@@ -131,15 +131,13 @@ res="${res}${CONFIG_LOCALVERSION}${LOCALVERSION}" · 130 unmodified lines
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"