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