Embed git in winiso

This commit is contained in:
Manuel Thalmann 2023-06-22 15:20:02 +02:00
parent 19c388dcdb
commit af2e58552f
2 changed files with 8 additions and 9 deletions

View file

@ -26,17 +26,24 @@ else
bootPath="/media/boot";
dataPath="/media/data";
setupLabel="winiso";
gitArchive="./$buildDir/git.msi";
pwshArchive="./$buildDir/pwsh.zip";
editionField="Edition ID";
mkdir -p "$buildDir";
cp -r winfs/* "$overlayDir";
if [ ! -f "$gitArchive" ]
then
curl -L "https://github.com/git-for-windows/git/releases/download/v2.41.0.windows.1/PortableGit-2.41.0-64-bit.7z.exe" -o "$gitArchive";
fi;
if [ ! -f "$pwshArchive" ]
then
curl -L "https://github.com/PowerShell/PowerShell/releases/download/v7.3.4/PowerShell-7.3.4-win-x64.zip" -o "$pwshArchive";
fi;
unzip "$pwshArchive" -d "$overlayDir/git";
unzip "$pwshArchive" -d "$overlayDir/PowerShell";
sudo mount --mkdir "$WIN11_IMAGE_PATH" "$mountPath";

View file

@ -1,14 +1,6 @@
$null = $env:WIN_COMPUTER_NAME;
$null = $env:SETUP_SCRIPT_NAME;
Set-ExecutionPolicy Bypass -Scope Process -Force;
[System.Net.ServicePointManager]::SecurityProtocol = [System.Net.ServicePointManager]::SecurityProtocol -bor 3072;
Invoke-Expression ((New-Object System.Net.WebClient).DownloadString('https://community.chocolatey.org/install.ps1'));
Import-Module $env:ChocolateyInstall/helpers/chocolateyProfile.psm1;
choco install -y git
choco install -y powershell-core;
refreshenv;
git clone https://git.nuth.ch/manuth/PortValhalla.git;
& "X:\git\git.exe" clone https://git.nuth.ch/manuth/PortValhalla.git;
Set-Location PortValhalla;
pwsh;