From ef8e77f778373d7cfd2e885b8df1e9acfb72ab50 Mon Sep 17 00:00:00 2001 From: Jonathan Dahan Date: Fri, 20 Sep 2024 11:09:33 -0400 Subject: [PATCH] Allow running build from any directory --- utilities/build/build-image.sh | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/utilities/build/build-image.sh b/utilities/build/build-image.sh index c471968b..6ed347fb 100755 --- a/utilities/build/build-image.sh +++ b/utilities/build/build-image.sh @@ -3,6 +3,9 @@ if ! command -v docker 2>/dev/null; then exit 1 fi +current_directory=$PWD +cd "$(dirname -- "$0")" + echo "updating pi-gen"; { test -d pi-gen || git clone https://github.com/RPi-Distro/pi-gen if [[ "$(uname -m)" == "arm64" ]] @@ -30,6 +33,7 @@ echo "updating config"; { } echo "building"; { - cd pi-gen - ./build-docker.sh + bash pi-gen/build-docker.sh + cp pi-gen/deploy/*.xz ${starting_directory}/ + ls ${starting_directory}/*xz }