mirror of
https://github.com/fleschutz/PowerShell.git
synced 2025-08-13 06:27:16 +02:00
Improve the output
This commit is contained in:
@ -1,6 +1,6 @@
|
||||
<#
|
||||
.SYNOPSIS
|
||||
Pulls updates for a Git repository (including submodules)
|
||||
Pulls updates for a Git repository
|
||||
.DESCRIPTION
|
||||
This script pulls updates for a local Git repository (including submodules).
|
||||
.PARAMETER RepoDir
|
||||
@ -8,7 +8,7 @@
|
||||
.EXAMPLE
|
||||
PS> ./pull-repo C:\MyRepo
|
||||
.NOTES
|
||||
Author: Markus Fleschutz · License: CC0
|
||||
Author: Markus Fleschutz / License: CC0
|
||||
.LINK
|
||||
https://github.com/fleschutz/PowerShell
|
||||
#>
|
||||
@ -18,7 +18,7 @@ param([string]$RepoDir = "$PWD")
|
||||
try {
|
||||
$StopWatch = [system.diagnostics.stopwatch]::startNew()
|
||||
|
||||
"⏳ (1/3) Checking requirements... "
|
||||
"⏳ Step 1/3: Checking requirements... "
|
||||
if (-not(test-path "$RepoDir" -pathType container)) { throw "Can't access directory: $RepoDir" }
|
||||
set-location "$RepoDir"
|
||||
|
||||
@ -29,11 +29,11 @@ try {
|
||||
exit 0 # success
|
||||
}
|
||||
|
||||
"⏳ (2/3) Pulling updates... "
|
||||
"⏳ Step 2/3: Pulling updates... "
|
||||
& git pull --recurse-submodules --jobs=4
|
||||
if ($lastExitCode -ne "0") { throw "'git pull' failed" }
|
||||
|
||||
"⏳ (3/3) Updating submodules... "
|
||||
"⏳ Step 3/3: Updating submodules... "
|
||||
& git submodule update --init --recursive
|
||||
if ($lastExitCode -ne "0") { throw "'git submodule update' failed" }
|
||||
|
||||
|
Reference in New Issue
Block a user