From a013a38e24f64bb3fd27b21175b5ec03f8d24e8c Mon Sep 17 00:00:00 2001 From: Linus Groh Date: Sat, 6 Mar 2021 17:43:53 +0100 Subject: [PATCH] Meta: Make 'run.sh qgrub' work via SERENITY_RUN It is possible to set the run.sh mode via the SERENITY_RUN environment variable, but the SERENITY_DISK_IMAGE="grub_disk_image" override for qgrub mode was only checking $1. This makes qgrub mode work via 'ninja run' without explicitly setting SERENITY_DISK_IMAGE: SERENITY_RUN=qgrub ninja run --- Meta/run.sh | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/Meta/run.sh b/Meta/run.sh index 091483e3af..fe1ec5fbf5 100755 --- a/Meta/run.sh +++ b/Meta/run.sh @@ -25,6 +25,7 @@ if [ "$(uname)" = "Darwin" ] && [ "$(uname -m)" = "x86_64" ]; then fi fi +SERENITY_RUN="${SERENITY_RUN:-$1}" [ -z "$SERENITY_QEMU_BIN" ] && SERENITY_QEMU_BIN="qemu-system-i386" @@ -35,7 +36,7 @@ fi [ -z "$SERENITY_QEMU_CPU" ] && SERENITY_QEMU_CPU="max" [ -z "$SERENITY_DISK_IMAGE" ] && { - if [ "$1" = qgrub ]; then + if [ "$SERENITY_RUN" = qgrub ]; then SERENITY_DISK_IMAGE="grub_disk_image" else SERENITY_DISK_IMAGE="_disk_image" @@ -79,8 +80,6 @@ export SDL_VIDEO_X11_DGAMOUSE=0 : "${SERENITY_BUILD:=.}" cd -P -- "$SERENITY_BUILD" || die "Could not cd to \"$SERENITY_BUILD\"" -SERENITY_RUN="${SERENITY_RUN:-$1}" - if [ "$SERENITY_RUN" = "b" ]; then # Meta/run.sh b: bochs [ -z "$SERENITY_BOCHSRC" ] && {