aboutsummaryrefslogtreecommitdiffsponsor
diff options
context:
space:
mode:
authorSlack Coder <slackcoder@server.ky>2024-08-13 07:11:13 -0500
committerSlack Coder <slackcoder@server.ky>2024-08-14 07:45:24 -0500
commite9f5104f37b7aefb20986c313af18f445b10fe7e (patch)
tree8a9aac377a7eb20d52abb43678aa39e46efb7296
parent65d0776d2336f933e38793dd322c87b95de5bfce (diff)
downloadefi-sync-e9f5104f37b7aefb20986c313af18f445b10fe7e.tar.xz
Make kernel version detection robustHEADv0.2.1master
Detect the kernel version by inspecting the file instead of the file naming.
-rw-r--r--ChangeLog.md6
-rw-r--r--efi-sync3
2 files changed, 8 insertions, 1 deletions
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}'."