Skip to content
Snippets Groups Projects
Commit 23450fd1 authored by Seblu's avatar Seblu
Browse files

Bump 2024.11.17-1

- Fix match kernels in modules directory
parent f9fc73a8
No related branches found
No related tags found
No related merge requests found
Pipeline #707 passed with stages
in 5 minutes and 21 seconds
# Maintainer: Sébastien Luttringer <seblu@seblu.net>
pkgname=(kernel-install-hook kernel-install-compat kernel-install-grub)
pkgver=2024.10.07
pkgver=2024.11.17
pkgrel=1
arch=('any')
url='https://git.seblu.net/archlinux/kernel-install-poc'
......@@ -12,7 +12,7 @@ source=('hook.sh'
'50-mkinitcpio-compat.install'
'90-loaderentry-compat.install'
'95-grub-update.install')
sha224sums=('01cff51f05c8b381117a564569a68df8e4a15fbc97a7804c5f0bb99f'
sha224sums=('0fe7665cb1b04ab3cba97388efc90cf6ac84b4373117fb8af63cffdd'
'ae0813a7f42a11efb02c03c7ab80671ff756b17109f4481fbe756bcb'
'32fbc4e69a3c9a6d917aed2f9e3b7a05b63a1bec8bd5002e6067b731'
'caaec9eeb5d6616d2e9fcbfa4255d0fcddd7d43af19e95319a683889'
......
......@@ -27,21 +27,24 @@ if (( EUID )); then
echo 'You must be root.' >&2
exit 1
fi
# check args count
(( $# != 1 )) && usage
while read -r path; do
kpath="/$path"
kver="${path##*/vmlinuz-}"
if [[ -z "$kver" ]]; then
echo "Unable to guess kernel version: $path" >&2
if [[ "$path" =~ /([^/]+)/vmlinuz$ ]]; then
# path looks like /usr/lib/modules/$kver/vmlinuz
kver="${BASH_REMATCH[1]}"
elif [[ "$path" =~ /vmlinuz-([^/]+)$ ]]; then
# path looks like usr/lib/kernel/vmlinuz-$kver
kver="${BASH_REMATCH[1]}"
else
echo "${0##*/}: Unsupported kernel path format: $path" >&2
continue
fi
case "$1" in
add)
kernel-install add "$kver" "$kpath" ;;
kernel-install add "$kver" "/$path" ;;
remove)
kernel-install remove "$kver" ;;
*)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment