[openwrt/openwrt] scripts/kernel_bump: Improve omitted version error

LEDE Commits lede-commits at lists.infradead.org
Fri Apr 12 09:21:01 PDT 2024


robimarko pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/ed896c32b09e3adfaa5fdda5c584ef776e395b09

commit ed896c32b09e3adfaa5fdda5c584ef776e395b09
Author: Olliver Schinagl <oliver at schinagl.nl>
AuthorDate: Thu Mar 21 09:41:54 2024 +0100

    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 at schinagl.nl>
---
 scripts/kernel_bump.sh | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/scripts/kernel_bump.sh b/scripts/kernel_bump.sh
index 82ee3f3eff..90e47789c3 100755
--- a/scripts/kernel_bump.sh
+++ b/scripts/kernel_bump.sh
@@ -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
 




More information about the lede-commits mailing list