mirror of
https://github.com/fleschutz/PowerShell.git
synced 2024-11-08 17:14:28 +01:00
Update install-updates.ps1
This commit is contained in:
parent
ddf5d71967
commit
3b6a408441
@ -2,7 +2,7 @@
|
||||
.SYNOPSIS
|
||||
install-updates.ps1
|
||||
.DESCRIPTION
|
||||
Installs updates for the local machhine (needs admin rights)
|
||||
Install updates on the local machhine (needs admin rights)
|
||||
.EXAMPLE
|
||||
PS> ./install-updates
|
||||
.NOTES
|
||||
@ -17,17 +17,17 @@ try {
|
||||
$StopWatch = [system.diagnostics.stopwatch]::startNew()
|
||||
|
||||
if ($IsLinux) {
|
||||
"👉 Step 1/4: Downloading updates for installed Debian packages..."
|
||||
sudo apt update
|
||||
"⏳ Step 1/4: Fetching update infos for installed Debian packages..."
|
||||
& sudo apt update
|
||||
|
||||
"👉 Step 2/4: Upgrading installed Debian packages..."
|
||||
sudo apt upgrade -y
|
||||
"⏳ Step 2/4: Upgrading installed Debian packages..."
|
||||
& sudo apt upgrade -y
|
||||
|
||||
"👉 Step 3/4: Removing obsolete Debian packages..."
|
||||
sudo apt autoremove
|
||||
"⏳ Step 3/4: Removing obsolete Debian packages..."
|
||||
& sudo apt autoremove
|
||||
|
||||
"👉 Step 4/4: Upgrading installed Snap packages..."
|
||||
sudo snap refresh
|
||||
"⏳ Step 4/4: Upgrading installed Snap packages..."
|
||||
& sudo snap refresh
|
||||
} else {
|
||||
"Sorry, not supported yet"
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user