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