allow bypassing additional installation steps

This commit is contained in:
Baipyrus 2024-11-24 22:59:51 +01:00
parent eaf1e8e9f3
commit 8ed8d2d411
2 changed files with 15 additions and 4 deletions

View File

@ -11,8 +11,8 @@ function InstallWinget
function WingetInstall
{
$install = Read-Host "Install/Update WinGet now? [Y/n]"
if ($install.ToLower() -ne 'n')
$update = Read-Host "Install/Update WinGet now? [Y/n]"
if ($update.ToLower() -ne 'n')
{
# Start admin process, import this script, run 'InstallPackages' function
Start-Process powershell.exe -Verb RunAs -Wait `
@ -20,5 +20,10 @@ function WingetInstall
"-C", "cd $pwd; ipmo ./util/winget.psm1; InstallWinget"
}
$install = Read-Host "Install WinGet Packages now? [Y/n]"
if ($install.ToLower() -eq 'n')
{ return
}
winget.exe install -s winget --accept-source-agreements (Get-Content ./util/winget.list)
}

View File

@ -17,14 +17,20 @@ function WSLInstall
{ return
}
$install = Read-Host "Install/Update WSL2 now? [Y/n]"
if ($install.ToLower() -ne 'n')
$update = Read-Host "Install/Update WSL2 now? [Y/n]"
if ($update.ToLower() -ne 'n')
{
# Start admin process, import this script, run 'InstallPackages' function
Start-Process powershell.exe -Verb RunAs -Wait `
-ArgumentList "-ExecutionPolicy", "Bypass", `
"-C", "cd $pwd; ipmo ./util/wsl.psm1; InstallWSL"
}
$install = Read-Host "Install WSL Distribution now? [Y/n]"
if ($install.ToLower() -eq 'n')
{ return
}
wsl.exe --install -d Ubuntu
# Add newly created user to sudoers group