test-patches: allow to automatically determine flavour for rc and bpo kernels
This allows to detect the current flavour (here: "amd64") for an rc kernel (here: $(uname -r) = 4.19.0-rc4-amd64). Also a bpo release is correctly detected with this change.
This commit is contained in:
parent
530b4e6298
commit
f100f671db
|
@ -6,7 +6,7 @@ shopt -s extglob
|
||||||
# Set defaults from the running kernel
|
# Set defaults from the running kernel
|
||||||
arch="$(dpkg --print-architecture)"
|
arch="$(dpkg --print-architecture)"
|
||||||
kernelabi="$(uname -r)"
|
kernelabi="$(uname -r)"
|
||||||
ff="${kernelabi#+([^-])-@(trunk|+([0-9]))-}"
|
ff="${kernelabi#+([^-])-@(trunk|?(rc)+([0-9])|+([0-9]).bpo.+([0-9]))-}"
|
||||||
if [ "x$ff" != "x$kernelabi" ]; then
|
if [ "x$ff" != "x$kernelabi" ]; then
|
||||||
flavour="${ff#@(openvz|rt|vserver|xen)-}"
|
flavour="${ff#@(openvz|rt|vserver|xen)-}"
|
||||||
if [ "x$flavour" != "x$ff" ]; then
|
if [ "x$flavour" != "x$ff" ]; then
|
||||||
|
|
Loading…
Reference in New Issue