scripts/kernel_bump: Improve omitted version error
authorOlliver Schinagl <oliver@schinagl.nl>
Thu, 21 Mar 2024 08:41:54 +0000 (09:41 +0100)
committerRobert Marko <robimarko@gmail.com>
Fri, 12 Apr 2024 16:20:52 +0000 (18:20 +0200)
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>
scripts/kernel_bump.sh

index 82ee3f3effd6c8defa7c5c7f1d02e24da0b11ffb..90e47789c37d374917c7d6458e86be29ac0a1d02 100755 (executable)
@@ -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