tools/run_guest_kernel.sh: Fix usage without initramfs

Signed-off-by: Hector Martin <marcan@marcan.st>
This commit is contained in:
Hector Martin 2022-08-30 21:42:16 +09:00
parent 90b8a47462
commit 846b1a4d6a

View file

@ -15,10 +15,12 @@ fi
kernel_base="$(realpath "$1")"
args="$2"
initramfs=""
if [ -n "$3" ]; then
initramfs="$(realpath "$3")"
shift 2
if [ -n "$1" ]; then
initramfs="$(realpath "$1")"
shift
fi
shift 3
if [ -z "$kernel" ]; then
kernel="$kernel_base"/arch/arm64/boot/Image.gz