summaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
authorOlliver Schinagl <oliver@schinagl.nl>2024-03-22 08:38:02 +0100
committerRobert Marko <robimarko@gmail.com>2024-04-12 18:20:52 +0200
commit03f2f530a00a55e6580733cd6ccd01a018a473ee (patch)
treef154abb9e37a889be1908f743bd1965823ca7ee5 /scripts
parent1bbc24926618898ec33ceb421d6571f1fa8f2b73 (diff)
downloadopenwrt-03f2f530a00a55e6580733cd6ccd01a018a473ee.tar.gz
openwrt-03f2f530a00a55e6580733cd6ccd01a018a473ee.tar.bz2
openwrt-03f2f530a00a55e6580733cd6ccd01a018a473ee.zip
scripts/kernel_bump: Always drop v prefix
Naivly and lazyly the leading v was only dropped from optarg, not from any environment variable. Lets do this properly and ensure a leading 'v' is always dropped. Signed-off-by: Olliver Schinagl <oliver@schinagl.nl>
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/kernel_bump.sh7
1 files changed, 5 insertions, 2 deletions
diff --git a/scripts/kernel_bump.sh b/scripts/kernel_bump.sh
index bbf6747fc1..82ee3f3eff 100755
--- a/scripts/kernel_bump.sh
+++ b/scripts/kernel_bump.sh
@@ -77,6 +77,9 @@ init()
initial_branch="$(git rev-parse --abbrev-ref HEAD)"
initial_commitish="$(git rev-parse HEAD)"
+ source_version="${source_version#v}"
+ target_version="${target_version#v}"
+
trap cleanup EXIT HUP INT QUIT ABRT ALRM TERM
}
@@ -180,10 +183,10 @@ main()
platform_name="${OPTARG}"
;;
's')
- source_version="${OPTARG#v}"
+ source_version="${OPTARG}"
;;
't')
- target_version="${OPTARG#v}"
+ target_version="${OPTARG}"
;;
':')
e_err "Option -${OPTARG} requires an argument."