From a500ea8b427a74e814c82976d4e928c10e16142a Mon Sep 17 00:00:00 2001 From: Manuel Thalmann Date: Wed, 21 Jun 2023 22:14:41 +0200 Subject: [PATCH] Ensure the build directory exists --- deploy.sh | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/deploy.sh b/deploy.sh index 9763382..06715c3 100755 --- a/deploy.sh +++ b/deploy.sh @@ -21,13 +21,15 @@ then echo "Please specify the path to the Windows 11 ISO image in your .env file located at:"; realpath --relative-to "$workingDir" "$(realpath .env)"; else + buildDir="build"; mountPath="/media/wininstall"; bootPath="/media/boot"; dataPath="/media/data"; setupLabel="winiso"; - pwshArchive="./build/pwsh.zip"; + pwshArchive="./$buildDir/pwsh.zip"; editionField="Edition ID"; + mkdir -p "$buildDir"; cp -r winfs/* "$overlayDir"; if [ ! -f "$pwshArchive" ] @@ -38,7 +40,7 @@ else unzip "$pwshArchive" -d "$overlayDir/PowerShell"; sudo mount --mkdir "$WIN11_IMAGE_PATH" "$mountPath"; - isoFile="./build/win.iso"; + isoFile="./$buildDir/win.iso"; mkdir -p "$(dirname "$isoFile")"; mkwinpeimg --iso --arch amd64 --overlay "$overlayDir" --windows-dir "$mountPath" "$isoFile"; sudo umount "$mountPath";