Date: Saturday, September 24, 2022 @ 09:14:55
  Author: tpowa
Revision: 456699

upgpkg: hwdetect 2022.09-4: read -r usage

Modified:
  hwdetect/trunk/PKGBUILD
  hwdetect/trunk/hwdetect

----------+
 PKGBUILD |    4 ++--
 hwdetect |    6 +++---
 2 files changed, 5 insertions(+), 5 deletions(-)

Modified: PKGBUILD
===================================================================
--- PKGBUILD    2022-09-23 21:26:28 UTC (rev 456698)
+++ PKGBUILD    2022-09-24 09:14:55 UTC (rev 456699)
@@ -1,7 +1,7 @@
 # Maintainer: Tobias Powalowski <[email protected]>
 pkgname=hwdetect
 pkgver=2022.09
-pkgrel=3
+pkgrel=4
 pkgdesc="Hardware detection script with loading modules and mkinitcpio.conf"
 arch=(any)
 url="https://archlinux.org/packages/extra/any/hwdetect/";
@@ -12,7 +12,7 @@
             'lvm2:       for lvm2 mkinitcpio config support'
             'mdadm:      for raid mkinitcpio config support')
 source=(hwdetect)
-sha512sums=('edb9909dc4c4696d993be8aa3f297fb12e7826fa18880af68a8a0cb862344e384a295e64407f321c23f33cd4736a442c1185dfe07762d9f4f3038029c0bd5fac')
+sha512sums=('96b62056c6f780af18152c2093c124b208a997f92a516d6842e75da30bc847d6abb69ec63b8ebb07170d5642ae68749f799e83ac8481193973271b2f22cf5d04')
 
 package() {
   install -D -m 755 "${srcdir}/hwdetect" "${pkgdir}/usr/bin/hwdetect"

Modified: hwdetect
===================================================================
--- hwdetect    2022-09-23 21:26:28 UTC (rev 456698)
+++ hwdetect    2022-09-24 09:14:55 UTC (rev 456699)
@@ -102,9 +102,9 @@
     [[ "$(uname -m)" == "x86_64" || "$(uname -m)" == "riscv64" ]] && 
VMLINUZ=/boot/vmlinuz-linux
     [[ "$(uname -m)" == "aarch64" ]] && VMLINUZ=/boot/Image
     if [[ -f "${VMLINUZ}" ]]; then
-        reader=cat
-        [[ $(file -b --mime-type "${VMLINUZ}") == 'application/gzip' ]] && 
reader=zcat
-        read _ _ kver _ < <($reader "${VMLINUZ}" | grep -m1 -aoE 'Linux 
version .(\.[-[:alnum:]]+)+')
+        reader="cat"
+        [[ $(file -b --mime-type "${VMLINUZ}") == 'application/gzip' ]] && 
reader="zcat"
+        read -r _ _ kver _ < <($reader "${VMLINUZ}" | grep -m1 -aoE 'Linux 
version .(\.[-[:alnum:]]+)+')
     fi
     # fallback if no detectable kernel is installed
     [[ "${_HWKVER}" == "" ]] && _HWKVER="$(uname -r)"

Reply via email to