Update the scripts

This commit is contained in:
Markus Fleschutz 2021-09-29 08:18:28 +02:00
parent 0dd2d484c5
commit 291d785700
3 changed files with 5 additions and 6 deletions

View File

@ -29,7 +29,7 @@ try {
[int]$Step = 1 [int]$Step = 1
foreach ($Folder in $Folders) { foreach ($Folder in $Folders) {
$FolderName = (get-item "$Folder").Name $FolderName = (get-item "$Folder").Name
"👉 Step $Step/$($FolderCount): Fetching 📂$FolderName..." " Step $Step/$($FolderCount): Fetching 📂$FolderName..."
& git -C "$Folder" fetch --all --recurse-submodules --prune --prune-tags --jobs=4 & git -C "$Folder" fetch --all --recurse-submodules --prune --prune-tags --jobs=4
if ($lastExitCode -ne "0") { throw "'git fetch' failed" } if ($lastExitCode -ne "0") { throw "'git fetch' failed" }

View File

@ -21,10 +21,10 @@ try {
& sudo apt update & sudo apt update
"⏳ Step 2/4: Upgrading installed Debian packages..." "⏳ Step 2/4: Upgrading installed Debian packages..."
& sudo apt upgrade -y & sudo apt upgrade --yes
"⏳ Step 3/4: Removing obsolete Debian packages..." "⏳ Step 3/4: Removing obsolete Debian packages..."
& sudo apt autoremove & sudo apt autoremove --yes
"⏳ Step 4/4: Upgrading installed Snap packages..." "⏳ Step 4/4: Upgrading installed Snap packages..."
& sudo snap refresh & sudo snap refresh

View File

@ -1,5 +1,4 @@
<# 
.SYNOPSIS
pull-repos.ps1 [<parent-dir>] pull-repos.ps1 [<parent-dir>]
.DESCRIPTION .DESCRIPTION
Pulls updates for all Git repositories under the current/given directory (including submodules) Pulls updates for all Git repositories under the current/given directory (including submodules)
@ -29,7 +28,7 @@ try {
[int]$Step = 1 [int]$Step = 1
foreach ($Folder in $Folders) { foreach ($Folder in $Folders) {
$FolderName = (get-item "$Folder").Name $FolderName = (get-item "$Folder").Name
"👉 Step $Step/$($FolderCount): Pulling 📂$FolderName..." " Step $Step/$($FolderCount): Pulling 📂$FolderName..."
& git -C "$Folder" pull --recurse-submodules --jobs=4 & git -C "$Folder" pull --recurse-submodules --jobs=4
if ($lastExitCode -ne "0") { write-warning "'git pull' on 📂$FolderName failed" } if ($lastExitCode -ne "0") { write-warning "'git pull' on 📂$FolderName failed" }