mirror of
https://github.com/fleschutz/PowerShell.git
synced 2025-01-28 08:38:38 +01:00
Update install-updates.ps1 and list-updates.ps1
This commit is contained in:
parent
5a992a9254
commit
7380410e28
@ -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
|
||||
|
@ -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 {
|
||||
|
Loading…
Reference in New Issue
Block a user