Updated the Markdown manuals

This commit is contained in:
Markus Fleschutz
2024-05-19 10:25:56 +02:00
parent c24030c909
commit 439fbf5bfa
621 changed files with 2430 additions and 1289 deletions

View File

@ -1,7 +1,7 @@
Script: *check-repos.ps1*
========================
This PowerShell script checks all Git repositories in a folder.
This PowerShell script verifies the data integrity of all Git repositories in a folder.
Parameters
----------
@ -9,7 +9,7 @@ Parameters
PS> ./check-repos.ps1 [[-parentDir] <String>] [<CommonParameters>]
-parentDir <String>
Specifies the path to the parent folder
Specifies the file path to the parent folder
Required? false
Position? 1
@ -25,7 +25,11 @@ PS> ./check-repos.ps1 [[-parentDir] <String>] [<CommonParameters>]
Example
-------
```powershell
PS> ./check-repos.ps1 C:\MyRepos
PS> ./check-repos.ps1 C:\Repos
Checking parent folder 📂C:\Repos... 16 subfolders
Checking 📂rust repository (1/16)...
...
Checked all 16 Git repos in 📂C:\Repos in 356s.
```
@ -44,11 +48,15 @@ Script Content
.SYNOPSIS
Checks Git repositories
.DESCRIPTION
This PowerShell script checks all Git repositories in a folder.
This PowerShell script verifies the data integrity of all Git repositories in a folder.
.PARAMETER parentDir
Specifies the path to the parent folder
Specifies the file path to the parent folder
.EXAMPLE
PS> ./check-repos.ps1 C:\MyRepos
PS> ./check-repos.ps1 C:\Repos
⏳ Checking parent folder 📂C:\Repos... 16 subfolders
⏳ Checking 📂rust repository (1/16)...
...
✔️ Checked all 16 Git repos in 📂C:\Repos in 356s.
.LINK
https://github.com/fleschutz/PowerShell
.NOTES
@ -61,20 +69,21 @@ try {
$stopWatch = [system.diagnostics.stopwatch]::startNew()
$parentDirName = (Get-Item "$parentDir").Name
"⏳ Step 1 - Checking parent folder 📂$parentDirName..."
Write-Host "⏳ Checking parent folder 📂$parentDir... " -noNewline
if (-not(Test-Path "$parentDir" -pathType container)) { throw "Can't access folder: $parentDir" }
$folders = (Get-ChildItem "$parentDir" -attributes Directory)
$numFolders = $folders.Count
"Found $numFolders subfolders."
"$numFolders subfolders"
[int]$Step = 1
[int]$step = 1
foreach ($folder in $folders) {
"`n⏳ Checking 📂$folder repository ($step/$numFolders)..."
& "$PSScriptRoot/check-repo.ps1" "$folder"
$Step++
$step++
}
[int]$elapsed = $stopWatch.Elapsed.TotalSeconds
"✔️ Checked $numFolders Git repos at 📂$parentDirName in $elapsed sec"
"✔️ Checked all $numFolders Git repos in 📂$parentDir in $($elapsed)s."
exit 0 # success
} catch {
"⚠️ Error in line $($_.InvocationInfo.ScriptLineNumber): $($Error[0])"
@ -82,4 +91,4 @@ try {
}
```
*(generated by convert-ps2md.ps1 using the comment-based help of check-repos.ps1 as of 03/27/2024 17:36:25)*
*(generated by convert-ps2md.ps1 using the comment-based help of check-repos.ps1 as of 05/19/2024 10:25:18)*