mirror of
https://github.com/archlinuxarm/PKGBUILDs.git
synced 2024-12-18 23:11:54 +00:00
29 lines
783 B
Diff
29 lines
783 B
Diff
From 7c407f4ddee777d54b746bab612f8914ce1e1339 Mon Sep 17 00:00:00 2001
|
|
From: Janne Grunau <j@jannau.net>
|
|
Date: Sun, 30 Jan 2022 10:01:43 +0000
|
|
Subject: [PATCH 2/3] functions: handle gzip compressed kernels in kver_generic
|
|
|
|
Signed-off-by: Janne Grunau <j@jannau.net>
|
|
---
|
|
functions | 5 +++++
|
|
1 file changed, 5 insertions(+)
|
|
|
|
diff --git a/functions b/functions
|
|
index cc47594..5b90a4b 100644
|
|
--- a/functions
|
|
+++ b/functions
|
|
@@ -228,6 +228,11 @@ kver_generic() {
|
|
|
|
read -r _ _ kver _ < <($reader "$1" | grep -m1 -aoE 'Linux version .(\.[-[:alnum:]+]+)+')
|
|
|
|
+ # try if the image is gzip compressed
|
|
+ if [[ -z "$kver" ]]; then
|
|
+ read _ _ kver _ < <(gzip -c -d "$1" | grep -m1 -aoE 'Linux version .(\.[-[:alnum:]]+)+')
|
|
+ fi
|
|
+
|
|
printf '%s' "$kver"
|
|
}
|
|
|
|
--
|
|
2.36.1
|
|
|