History

setlocalversion: simplify the construction of the short version

With the --short option given, scm_version() prints "+". Just append it.

Masahiro Yamada committed 3 years ago

Commit 992ebfa1 parent f6e09b01 file · +1 −2Browse files

Unified · Split

scripts/setlocalversion+1−2
@@ -121,8 +121,7 @@ elif [ "${LOCALVERSION+set}" != "set" ]; then · 120 unmodified lines
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"