mirror of
https://github.com/fleschutz/PowerShell.git
synced 2024-11-23 08:23:14 +01:00
Update install-updates.ps1
This commit is contained in:
parent
cf3dbd051f
commit
13e8828482
@ -17,19 +17,23 @@ try {
|
||||
$StopWatch = [system.diagnostics.stopwatch]::startNew()
|
||||
|
||||
if ($IsLinux) {
|
||||
"⏳ Step 1/4: Fetching update infos for installed Debian packages..."
|
||||
"⏳ Step 1/4 - Fetching update infos for installed Debian packages..."
|
||||
& sudo apt update
|
||||
|
||||
"⏳ Step 2/4: Upgrading installed Debian packages..."
|
||||
"⏳ Step 2/4 - Upgrading installed Debian packages..."
|
||||
& sudo apt upgrade --yes
|
||||
|
||||
"⏳ Step 3/4: Removing obsolete Debian packages..."
|
||||
"⏳ Step 3/4 - Removing obsolete Debian packages..."
|
||||
& sudo apt autoremove --yes
|
||||
|
||||
"⏳ Step 4/4: Upgrading installed Snap packages..."
|
||||
"⏳ Step 4/4 - Upgrading installed Snap packages..."
|
||||
& sudo snap refresh
|
||||
} else {
|
||||
"Sorry, not supported yet"
|
||||
"⏳ Step 1/2 - Checking for application updates..."
|
||||
winget upgrade
|
||||
|
||||
"⏳ Step 2/2 - Upgrading application..."
|
||||
winget upgrade --all
|
||||
}
|
||||
|
||||
[int]$Elapsed = $StopWatch.Elapsed.TotalSeconds
|
||||
|
Loading…
Reference in New Issue
Block a user