Ensure the build directory exists
This commit is contained in:
parent
b51f25e7ce
commit
a500ea8b42
|
@ -21,13 +21,15 @@ then
|
||||||
echo "Please specify the path to the Windows 11 ISO image in your .env file located at:";
|
echo "Please specify the path to the Windows 11 ISO image in your .env file located at:";
|
||||||
realpath --relative-to "$workingDir" "$(realpath .env)";
|
realpath --relative-to "$workingDir" "$(realpath .env)";
|
||||||
else
|
else
|
||||||
|
buildDir="build";
|
||||||
mountPath="/media/wininstall";
|
mountPath="/media/wininstall";
|
||||||
bootPath="/media/boot";
|
bootPath="/media/boot";
|
||||||
dataPath="/media/data";
|
dataPath="/media/data";
|
||||||
setupLabel="winiso";
|
setupLabel="winiso";
|
||||||
pwshArchive="./build/pwsh.zip";
|
pwshArchive="./$buildDir/pwsh.zip";
|
||||||
editionField="Edition ID";
|
editionField="Edition ID";
|
||||||
|
|
||||||
|
mkdir -p "$buildDir";
|
||||||
cp -r winfs/* "$overlayDir";
|
cp -r winfs/* "$overlayDir";
|
||||||
|
|
||||||
if [ ! -f "$pwshArchive" ]
|
if [ ! -f "$pwshArchive" ]
|
||||||
|
@ -38,7 +40,7 @@ else
|
||||||
unzip "$pwshArchive" -d "$overlayDir/PowerShell";
|
unzip "$pwshArchive" -d "$overlayDir/PowerShell";
|
||||||
|
|
||||||
sudo mount --mkdir "$WIN11_IMAGE_PATH" "$mountPath";
|
sudo mount --mkdir "$WIN11_IMAGE_PATH" "$mountPath";
|
||||||
isoFile="./build/win.iso";
|
isoFile="./$buildDir/win.iso";
|
||||||
mkdir -p "$(dirname "$isoFile")";
|
mkdir -p "$(dirname "$isoFile")";
|
||||||
mkwinpeimg --iso --arch amd64 --overlay "$overlayDir" --windows-dir "$mountPath" "$isoFile";
|
mkwinpeimg --iso --arch amd64 --overlay "$overlayDir" --windows-dir "$mountPath" "$isoFile";
|
||||||
sudo umount "$mountPath";
|
sudo umount "$mountPath";
|
||||||
|
|
Loading…
Reference in a new issue