From e9f5104f37b7aefb20986c313af18f445b10fe7e Mon Sep 17 00:00:00 2001 From: Slack Coder Date: Tue, 13 Aug 2024 07:11:13 -0500 Subject: Make kernel version detection robust Detect the kernel version by inspecting the file instead of the file naming. --- ChangeLog.md | 6 ++++++ efi-sync | 3 ++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/ChangeLog.md b/ChangeLog.md index 777eee4..3af1040 100644 --- a/ChangeLog.md +++ b/ChangeLog.md @@ -2,6 +2,12 @@ All notable changes to this project will be documented in this file. +## [0.2.1] - 2024-08-13 + +### Fixed + + - Fix how the kernel version is sourced to support recent changes in Slackware Current. + ## [0.2.0-alpha] - 2024-04-29 ### Added diff --git a/efi-sync b/efi-sync index f8be4f4..3d5fa4f 100644 --- a/efi-sync +++ b/efi-sync @@ -51,12 +51,13 @@ require_root () { fi } + efi_install () { require_root require_efi load_config - KERNEL_VERSION="$(basename $(realpath "$KERNEL") | sed -E 's/vmlinuz-(.*)-(.*)/\2/')" + KERNEL_VERSION="$(file $(realpath "$KERNEL") | sed -E 's/.* version (\S*) .*/\1/')" if ! cp -H "$KERNEL" "${EFI_KERNEL}"; then log "Failed to copy '${KERNEL}' into your EFI at '${EFI_KERNEL}'." -- cgit v1.2.3