fix(mkimg): bash: local: can only be used in a function

Signed-off-by: Coelacanthus <coelacanthus@outlook.com>
This commit is contained in:
Coelacanthus 2022-07-29 19:07:40 +08:00
parent 5a7a0c6c96
commit 0f2e94e4b6
No known key found for this signature in database
GPG key ID: E35C89E45867AE35

View file

@ -105,7 +105,7 @@ label linux
EOF EOF
msg "Re-generate initramfs for QEMU..." msg "Re-generate initramfs for QEMU..."
local kver=$(sudo arch-chroot qcow2 pacman -Si linux | grep -Po '(?<=Version : ).*') kver=$(sudo arch-chroot qcow2 pacman -Si linux | grep -Po '(?<=Version : ).*')
sudo arch-chroot qcow2 dracut --force --add "qemu qemu-net" /boot/initramfs-linux.img ${kver/.arch/-arch} sudo arch-chroot qcow2 dracut --force --add "qemu qemu-net" /boot/initramfs-linux.img ${kver/.arch/-arch}
msg "Clean up..." msg "Clean up..."