mirror of
https://github.com/fleschutz/PowerShell.git
synced 2025-04-19 08:28:19 +02:00
Update install-updates.ps1
This commit is contained in:
parent
f77735e741
commit
3a0c2eca64
@ -27,14 +27,13 @@ try {
|
|||||||
"⏳ (4/4) Upgrading installed Snap packages..."
|
"⏳ (4/4) Upgrading installed Snap packages..."
|
||||||
& sudo snap refresh
|
& sudo snap refresh
|
||||||
} else {
|
} else {
|
||||||
"⏳ (1/2) Querying application updates..."
|
Write-Progress "⏳ Installing updates..."
|
||||||
& winget upgrade
|
|
||||||
" "
|
" "
|
||||||
"⏳ (2/2) Upgrading applications..."
|
|
||||||
& winget upgrade --all
|
& winget upgrade --all
|
||||||
|
Write-Progress -completed " "
|
||||||
}
|
}
|
||||||
[int]$Elapsed = $StopWatch.Elapsed.TotalSeconds
|
[int]$Elapsed = $StopWatch.Elapsed.TotalSeconds
|
||||||
"✅ updates installed in $Elapsed sec."
|
"✅ updates installed in $Elapsed sec"
|
||||||
exit 0 # success
|
exit 0 # success
|
||||||
} catch {
|
} catch {
|
||||||
"⚠️ Error in line $($_.InvocationInfo.ScriptLineNumber): $($Error[0])"
|
"⚠️ Error in line $($_.InvocationInfo.ScriptLineNumber): $($Error[0])"
|
||||||
|
Loading…
Reference in New Issue
Block a user