efi-sync

Automatically install your kernel and initrd into the EFI
Log | Files | Refs | README

commit e9f5104f37b7aefb20986c313af18f445b10fe7e
parent 65d0776d2336f933e38793dd322c87b95de5bfce
Author: Slack Coder <slackcoder@server.ky>
Date:   Tue, 13 Aug 2024 07:11:13 -0500

Make kernel version detection robust

Detect the kernel version by inspecting the file instead of the file
naming.

Diffstat:
MChangeLog.md | 6++++++
Mefi-sync | 3++-
2 files changed, 8 insertions(+), 1 deletion(-)

diff --git 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 @@ -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}'."