mirror of
https://github.com/fleschutz/PowerShell.git
synced 2025-03-23 03:37:03 +01:00
Update pull-repo.ps1
This commit is contained in:
parent
609440022a
commit
e8df5794cd
@ -16,9 +16,9 @@
|
||||
param([string]$RepoDir = "$PWD")
|
||||
|
||||
try {
|
||||
"🢃 Pulling updates..."
|
||||
$StopWatch = [system.diagnostics.stopwatch]::startNew()
|
||||
|
||||
"⏳ (1/3) Checking requirements... "
|
||||
if (-not(test-path "$RepoDir" -pathType container)) { throw "Can't access directory: $RepoDir" }
|
||||
set-location "$RepoDir"
|
||||
|
||||
@ -29,9 +29,11 @@ try {
|
||||
exit 0 # success
|
||||
}
|
||||
|
||||
"⏳ (2/3) Pulling updates... "
|
||||
& git pull --recurse-submodules --jobs=4
|
||||
if ($lastExitCode -ne "0") { throw "'git pull' failed" }
|
||||
|
||||
"⏳ (3/3) Updating submodules... "
|
||||
& git submodule update --init --recursive
|
||||
if ($lastExitCode -ne "0") { throw "'git submodule update' failed" }
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user