From ad4284428a3945292114e239d5951e5b30a7bdce Mon Sep 17 00:00:00 2001 From: Shannon Booth Date: Sun, 5 Jan 2020 18:38:53 +1300 Subject: [PATCH] Meta: Allow sync.sh to be run from any directory I often keep my terminal camped in the project root directory and run `make && ./Kernel/sync.sh && ./Kernel/run` This change allows me to not feel like a doofus when I do that :^) --- Kernel/sync.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Kernel/sync.sh b/Kernel/sync.sh index 79e17d44ad..7d1e3570f3 100755 --- a/Kernel/sync.sh +++ b/Kernel/sync.sh @@ -1,3 +1,5 @@ #!/bin/sh +script_path=$(cd -P -- "$(dirname -- "$0")" && pwd -P) +cd "$script_path" sudo -E PATH="$PATH" ./build-image-qemu.sh