Updated the manuals

This commit is contained in:
Markus Fleschutz
2024-08-15 09:51:46 +02:00
parent 654d1a18d0
commit e1ffab5509
633 changed files with 2120 additions and 973 deletions

View File

@ -27,7 +27,7 @@ Example
```powershell
PS> ./pull-repo.ps1
(1/4) Searching for Git executable... git version 2.44.0.windows.1
(2/4) Checking local repository... 📂C:\Repos\rust
(2/4) Checking local repository... C:\Repos\rust
(3/4) Pulling remote updates...
(4/4) Updating submodules...
Updates pulled into 📂rust repo in 14s.
@ -55,7 +55,7 @@ Script Content
.EXAMPLE
PS> ./pull-repo.ps1
⏳ (1/4) Searching for Git executable... git version 2.44.0.windows.1
⏳ (2/4) Checking local repository... 📂C:\Repos\rust
⏳ (2/4) Checking local repository... C:\Repos\rust
⏳ (3/4) Pulling remote updates...
⏳ (4/4) Updating submodules...
✔️ Updates pulled into 📂rust repo in 14s.
@ -74,13 +74,16 @@ try {
& git --version
if ($lastExitCode -ne "0") { throw "Can't execute 'git' - make sure Git is installed and available" }
Write-Host "⏳ (2/4) Checking local repository... 📂$pathToRepo"
Write-Host "⏳ (2/4) Checking local repository... $pathToRepo"
if (-not(Test-Path "$pathToRepo" -pathType container)) { throw "Can't access folder: $pathToRepo" }
$result = (git -C "$pathToRepo" status)
if ("$result" -match "HEAD detached at ") { throw "Nothing to pull due to detached HEAD state (not on a branch!)" }
$pathToRepoName = (Get-Item "$pathToRepo").Name
Write-Host "⏳ (3/4) Pulling remote updates..."
Write-Host "⏳ (3/4) Pulling remote updates... " -noNewline
& git -C "$pathToRepo" remote get-url origin
if ($lastExitCode -ne "0") { throw "'git remote get-url origin' failed with exit code $lastExitCode" }
& git -C "$pathToRepo" pull --recurse-submodules=yes
if ($lastExitCode -ne "0") { throw "'git pull' failed with exit code $lastExitCode" }
@ -92,9 +95,9 @@ try {
"✔️ Updates pulled into 📂$pathToRepoName repo in $($elapsed)s."
exit 0 # success
} catch {
"⚠️ Error in line $($_.InvocationInfo.ScriptLineNumber): $($Error[0])"
"⚠️ Error: $($Error[0]) in script line $($_.InvocationInfo.ScriptLineNumber)"
exit 1
}
```
*(generated by convert-ps2md.ps1 using the comment-based help of pull-repo.ps1 as of 05/19/2024 10:25:25)*
*(generated by convert-ps2md.ps1 using the comment-based help of pull-repo.ps1 as of 08/15/2024 09:50:53)*