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.
This commit is contained in:
Shannon Booth 2019-12-24 12:53:22 +13:00 committed by Andreas Kling
parent 0fdbe08637
commit ef6eb07468
Notes: sideshowbarker 2024-07-19 10:44:05 +09:00
2 changed files with 6 additions and 0 deletions

View file

@ -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)

View file

@ -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"