scripts/kernel_bump: Improve omitted version error

If a version string was not supplied, we currently print an empty
string. We can do better here. Also by popular demand, print the usage
information in case of error.

Signed-off-by: Olliver Schinagl <oliver@schinagl.nl>
This commit is contained in:
Olliver Schinagl 2024-03-21 09:41:54 +01:00 committed by Robert Marko
parent 03f2f530a0
commit ed896c32b0
1 changed files with 3 additions and 1 deletions

View File

@ -205,7 +205,9 @@ main()
target_version="${target_version:-${TARGET_VERSION:-}}"
if [ -z "${source_version:-}" ] || [ -z "${target_version:-}" ]; then
e_err "Source (${source_version}) and target (${target_version}) versions need to be defined."
e_err "Source (${source_version:-missing source version}) and target (${target_version:-missing target version}) versions need to be defined."
echo
usage
exit 1
fi