main/devicepkg-dev: Fix deviceinfo variables for kernels with "-" in name (!892)

Kernel subpackages may contain a "-" (e.g. -kernel-mainline-modem);
replace it with an underscore to make sure that we find the
kernel-specific variables in deviceinfo.
This commit is contained in:
Minecrell 2020-01-18 11:43:16 +01:00
parent 26cfbcc4c9
commit 81d8d03d5f
No known key found for this signature in database
GPG key ID: 699D16185DAFAE61
2 changed files with 3 additions and 3 deletions

View file

@ -21,7 +21,7 @@ install -Dm644 "$srcdir/deviceinfo" \
"$subpkgdir/etc/deviceinfo"
# Get the kernel type ("downstream", "mainline")
kernel=$(echo "$subpkgname" | sed -n "s/.*-kernel-\(.*\)/\1/p")
kernel=$(echo "$subpkgname" | sed -n "s/.*-kernel-\(.*\)/\1/p" | tr - _)
# Iterate over deviceinfo variables that have the kernel type as suffix
# var looks like: deviceinfo_kernel_cmdline, ...