mirror of
https://gitlab.archlinux.org/tpowa/archboot.git
synced 2024-09-20 03:50:37 +02:00
shellcheck fix for read
This commit is contained in:
parent
679b6c3120
commit
2ec4b2445f
1 changed files with 2 additions and 2 deletions
|
@ -118,10 +118,10 @@ auto_mkinitcpio() {
|
||||||
offset=$(hexdump -s 526 -n 2 -e '"%0d"' "${DESTDIR}/boot/${VMLINUZ}")
|
offset=$(hexdump -s 526 -n 2 -e '"%0d"' "${DESTDIR}/boot/${VMLINUZ}")
|
||||||
read -r HWKVER _ < <(dd if="${DESTDIR}/boot/${VMLINUZ}" bs=1 count=127 skip=$(( offset + 0x200 )) 2>/dev/null)
|
read -r HWKVER _ < <(dd if="${DESTDIR}/boot/${VMLINUZ}" bs=1 count=127 skip=$(( offset + 0x200 )) 2>/dev/null)
|
||||||
elif [[ "${RUNNING_ARCH}" == "aarch64" ]]; then
|
elif [[ "${RUNNING_ARCH}" == "aarch64" ]]; then
|
||||||
read _ _ HWKVER _ < <(grep -m1 -aoE 'Linux version .(\.[-[:alnum:]]+)+' "${DESTDIR}/boot/${VMLINUZ}")
|
read -r _ _ HWKVER _ < <(grep -m1 -aoE 'Linux version .(\.[-[:alnum:]]+)+' "${DESTDIR}/boot/${VMLINUZ}")
|
||||||
# try if the image is gzip compressed
|
# try if the image is gzip compressed
|
||||||
if [[ -z "${HWKVER}" ]]; then
|
if [[ -z "${HWKVER}" ]]; then
|
||||||
read _ _ HWKVER _ < <(gzip -c -d "${DESTDIR}/boot/${VMLINUZ}" | grep -m1 -aoE 'Linux version .(\.[-[:alnum:]]+)+')
|
read -r _ _ HWKVER _ < <(gzip -c -d "${DESTDIR}/boot/${VMLINUZ}" | grep -m1 -aoE 'Linux version .(\.[-[:alnum:]]+)+')
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
# arrange MODULES for mkinitcpio.conf
|
# arrange MODULES for mkinitcpio.conf
|
||||||
|
|
Loading…
Reference in a new issue