PowerShell_Scripts/base.linux/Update-OSz.ps1

15 lines
405 B
PowerShell

param(
[ValidateSet('List','Update','Auto','All')]
[string]$Mode = 'List'
)
$local:detectedDisistro = cat /etc/os-release | Select-String -Pattern "^ID=" | ForEach-Object { $_ -split '=' | Select-Object -Skip 1 }
switch ($detectedDisistro) {
'arch' {
Update-ArchOSz -Mode:$Mode $args
}
{$_ -in 'debian','ubuntu','zorin'} {
Update-UbuntuOSz -Mode:$Mode $args
}
}