From f32ab73accddc9d7a0e7d131f69695153bfe5768 Mon Sep 17 00:00:00 2001 From: Apoorv Mishra Date: Sun, 13 Jun 2021 16:35:48 +0530 Subject: [PATCH] Meta: Fix QEMU version check in run.sh The QEMU version check in `Meta/run.sh` fails on macOS because the BSD version of `grep` does not support the `-P` option. Using `sed` instead. --- Meta/run.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Meta/run.sh b/Meta/run.sh index 7c199c6eea..533516af32 100755 --- a/Meta/run.sh +++ b/Meta/run.sh @@ -44,7 +44,7 @@ SERENITY_RUN="${SERENITY_RUN:-$1}" } SERENITY_QEMU_MIN_REQ_VERSION=5 -installed_major_version=$("$SERENITY_QEMU_BIN" -version | head -n 1 | grep -Po "(?<=QEMU emulator version )([1-9]\d*|0)") +installed_major_version=$("$SERENITY_QEMU_BIN" -version | head -n 1 | sed -E 's/QEMU emulator version ([1-9][0-9]*|0).*/\1/') [ "$installed_major_version" -lt "$SERENITY_QEMU_MIN_REQ_VERSION" ] && die "Required QEMU >= 5.0! Found $($SERENITY_QEMU_BIN -version | head -n 1)" [ -z "$SERENITY_COMMON_QEMU_ARGS" ] && SERENITY_COMMON_QEMU_ARGS="