shellcheck fixes

This commit is contained in:
Tobias Powalowski 2022-09-23 09:00:45 +02:00
parent a5e0612a6e
commit 6835d1c652

View file

@ -168,7 +168,7 @@ _zram_usr() {
USR_SYMLINKS="bin local lib lib64" USR_SYMLINKS="bin local lib lib64"
fi fi
for i in ${USR_SYMLINKS}; do for i in ${USR_SYMLINKS}; do
/usr.zram/bin/sln /usr.zram/${i} /usr/${i} /usr.zram/bin/sln /usr.zram/"${i}" /usr/"${i}"
done done
# pacman kills symlinks in below /usr # pacman kills symlinks in below /usr
# mount --bind is the only way to solve this. # mount --bind is the only way to solve this.
@ -256,10 +256,10 @@ _kver_x86() {
_kver_generic() { _kver_generic() {
# get kernel version from installed kernel # get kernel version from installed kernel
if [[ -f "/${VMLINUZ}" ]]; then if [[ -f "/${VMLINUZ}" ]]; then
reader=cat reader="cat"
# try if the image is gzip compressed # try if the image is gzip compressed
[[ $(file -b --mime-type "/${VMLINUZ}") == 'application/gzip' ]] && reader=zcat [[ $(file -b --mime-type "/${VMLINUZ}") == 'application/gzip' ]] && reader="zcat"
read _ _ kver _ < <($reader "/${VMLINUZ}" | grep -m1 -aoE 'Linux version .(\.[-[:alnum:]]+)+') read -r _ _ HWKVER _ < <($reader "/${VMLINUZ}" | grep -m1 -aoE 'Linux version .(\.[-[:alnum:]]+)+')
fi fi
# fallback if no detectable kernel is installed # fallback if no detectable kernel is installed