diff options
author | sin-ack <sin-ack@users.noreply.github.com> | 2021-08-07 07:00:36 +0000 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2021-08-07 11:47:07 +0200 |
commit | bb609cee7fbeb1d8e06d2c8eae16b446d29c7a0b (patch) | |
tree | 4f6ccb4a0aea8a0ad083931839fe5b2c58b4eb67 | |
parent | ab39a94fdf54920a3ce2cc85dc77c963bcc7eb2f (diff) | |
download | serenity-bb609cee7fbeb1d8e06d2c8eae16b446d29c7a0b.zip |
Meta: Add run-local.sh
This allows one to set their desired parameters for run.sh without the
need to set them in every terminal session or add it to the user account
shell files. If a run-local.sh file exists at the repository root and is
executable, it will be sourced. The file can contain any variables that
are expected to be set in run.sh.
-rw-r--r-- | .gitignore | 1 | ||||
-rwxr-xr-x | Meta/run.sh | 8 |
2 files changed, 7 insertions, 2 deletions
diff --git a/.gitignore b/.gitignore index 592cb8a8f0..b68451ece1 100644 --- a/.gitignore +++ b/.gitignore @@ -23,6 +23,7 @@ compile_commands.json .clangd .idea/ cmake-build-debug/ +run-local.sh sync-local.sh .vim/ diff --git a/Meta/run.sh b/Meta/run.sh index 05142d97dd..f0f7784956 100755 --- a/Meta/run.sh +++ b/Meta/run.sh @@ -8,6 +8,12 @@ die() { exit 1 } +SCRIPT_DIR="$(dirname "${0}")" + +# https://www.shellcheck.net/wiki/SC1090 No need to shellcheck private config. +# shellcheck source=/dev/null +[ -x "$SCRIPT_DIR/../run-local.sh" ] && . "$SCRIPT_DIR/../run-local.sh" + #SERENITY_PACKET_LOGGING_ARG="-object filter-dump,id=hue,netdev=breh,file=e1000.pcap" KVM_SUPPORT="0" @@ -26,8 +32,6 @@ if [ "$(uname)" = "Darwin" ] && [ "$(uname -m)" = "x86_64" ]; then fi fi -SCRIPT_DIR="$(dirname "${0}")" - # Prepend the toolchain qemu directory so we pick up QEMU from there PATH="$SCRIPT_DIR/../Toolchain/Local/qemu/bin:$PATH" |