summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEmanuele Torre <torreemanuele6@gmail.com>2020-06-24 03:24:10 +0200
committerAndreas Kling <kling@serenityos.org>2020-07-01 12:53:39 +0200
commitf7f1c3d7485aa3992bd49dbe3c25e35c460d6ab7 (patch)
tree306f2f264e71bf8b73610e1288f1cdc4ca848980
parent0cee39355c61e4b54f4f7107ed36f52e0f184a5f (diff)
downloadserenity-f7f1c3d7485aa3992bd49dbe3c25e35c460d6ab7.zip
Meta: use "better" syntax to set SERENITY_KERNEL_CMDLINE in run.sh :^)
This removes some FIXMEs. In bash, we could avoid `shift`: SERENITY_KERNEL_CMDLINE="${@:2}" But let's stick to POSIX sh for now.
-rwxr-xr-xMeta/run.sh16
1 files changed, 4 insertions, 12 deletions
diff --git a/Meta/run.sh b/Meta/run.sh
index 39fbff3eb1..c84efaaa39 100755
--- a/Meta/run.sh
+++ b/Meta/run.sh
@@ -76,12 +76,8 @@ elif [ "$1" = "qgrub" ]; then
-netdev user,id=breh,hostfwd=tcp:127.0.0.1:8888-10.0.2.15:8888,hostfwd=tcp:127.0.0.1:8823-10.0.2.15:23 \
-device e1000,netdev=breh
elif [ "$1" = "q35_cmd" ]; then
- SERENITY_KERNEL_CMDLINE=""
- # FIXME: Someone who knows sh syntax better, please help:
- for _ in $(seq 2 $#); do
- shift
- SERENITY_KERNEL_CMDLINE="$SERENITY_KERNEL_CMDLINE $1"
- done
+ shift
+ SERENITY_KERNEL_CMDLINE="$*"
echo "Starting SerenityOS, Commandline: ${SERENITY_KERNEL_CMDLINE}"
# ./run: qemu with SerenityOS with custom commandline
"$SERENITY_QEMU_BIN" \
@@ -92,12 +88,8 @@ elif [ "$1" = "q35_cmd" ]; then
-kernel Kernel/Kernel \
-append "${SERENITY_KERNEL_CMDLINE}"
elif [ "$1" = "qcmd" ]; then
- SERENITY_KERNEL_CMDLINE=""
- # FIXME: Someone who knows sh syntax better, please help:
- for _ in $(seq 2 $#); do
- shift
- SERENITY_KERNEL_CMDLINE="$SERENITY_KERNEL_CMDLINE $1"
- done
+ shift
+ SERENITY_KERNEL_CMDLINE="$*"
echo "Starting SerenityOS, Commandline: ${SERENITY_KERNEL_CMDLINE}"
# ./run: qemu with SerenityOS with custom commandline
"$SERENITY_QEMU_BIN" \