Update install-updates.ps1 and list-updates.ps1

This commit is contained in:
Markus Fleschutz 2023-04-21 17:46:35 +02:00
parent 5a992a9254
commit 7380410e28
2 changed files with 4 additions and 4 deletions

View File

@ -3,6 +3,7 @@
Installs software updates
.DESCRIPTION
This PowerShell script installs updates for the local machine (needs admin rights).
Use "list-updates.ps1" to list available updates.
.EXAMPLE
PS> ./install-updates
.LINK

View File

@ -14,16 +14,15 @@
try {
if ($IsLinux) {
Write-Host " Querying package updates..."
" (1/2) Querying package updates... (use install-updates.ps1 to install them)"
& sudo apt update
& sudo apt list --upgradable
Write-Host " Querying Snap updates..."
" (2/2) Querying Snap updates... (use install-updates.ps1 to install them)"
sudo snap refresh --list
} else {
Write-Progress "⏳ Querying application updates..."
"⏳ Querying application updates... (use install-updates.ps1 to install them)"
" "
& winget upgrade
Write-Progress -Completed " "
}
exit 0 # success
} catch {