From ef6eb07468e410f576d1011ddde2029035c170aa Mon Sep 17 00:00:00 2001 From: Shannon Booth Date: Tue, 24 Dec 2019 12:53:22 +1300 Subject: [PATCH] Build: Meta: Allow makeall.sh and run to be called from any directory These scripts assume that they are called from within Kernel/ directory. For convenience, set the current working directory in the scripts to the path where they are located. --- Kernel/makeall.sh | 3 +++ Kernel/run | 3 +++ 2 files changed, 6 insertions(+) diff --git a/Kernel/makeall.sh b/Kernel/makeall.sh index e1beaea98e..26b44c8891 100755 --- a/Kernel/makeall.sh +++ b/Kernel/makeall.sh @@ -1,6 +1,9 @@ #!/bin/sh set -e +script_path=$(cd -P -- "$(dirname -- "$0")" && pwd -P) +cd "$script_path" + # Get user and group details for setting qemu disk image ownership export build_user=$(id -u) export build_group=$(id -g) diff --git a/Kernel/run b/Kernel/run index b666ea3543..d5709adf8d 100755 --- a/Kernel/run +++ b/Kernel/run @@ -1,5 +1,8 @@ #!/bin/sh +script_path=$(cd -P -- "$(dirname -- "$0")" && pwd -P) +cd "$script_path" + #SERENITY_PACKET_LOGGING_ARG="-object filter-dump,id=hue,netdev=breh,file=e1000.pcap" [ -e /dev/kvm -a -r /dev/kvm -a -w /dev/kvm ] && SERENITY_KVM_ARG="-enable-kvm"