Skip to content

Commit

Permalink
Updated the Markdown manuals
Browse files Browse the repository at this point in the history
  • Loading branch information
fleschutz committed May 19, 2024
1 parent c24030c commit 439fbf5
Show file tree
Hide file tree
Showing 621 changed files with 2,432 additions and 1,291 deletions.
2 changes: 1 addition & 1 deletion docs/add-firewall-rules.md
Original file line number Diff line number Diff line change
Expand Up @@ -113,4 +113,4 @@ try {
```

*(generated by convert-ps2md.ps1 using the comment-based help of add-firewall-rules.ps1 as of 03/27/2024 17:36:23)*
*(generated by convert-ps2md.ps1 using the comment-based help of add-firewall-rules.ps1 as of 05/19/2024 10:25:16)*
2 changes: 1 addition & 1 deletion docs/add-memo.md
Original file line number Diff line number Diff line change
Expand Up @@ -79,4 +79,4 @@ try {
}
```

*(generated by convert-ps2md.ps1 using the comment-based help of add-memo.ps1 as of 03/27/2024 17:36:23)*
*(generated by convert-ps2md.ps1 using the comment-based help of add-memo.ps1 as of 05/19/2024 10:25:16)*
2 changes: 1 addition & 1 deletion docs/alert.md
Original file line number Diff line number Diff line change
Expand Up @@ -71,4 +71,4 @@ try {
}
```

*(generated by convert-ps2md.ps1 using the comment-based help of alert.ps1 as of 03/27/2024 17:36:23)*
*(generated by convert-ps2md.ps1 using the comment-based help of alert.ps1 as of 05/19/2024 10:25:16)*
42 changes: 23 additions & 19 deletions docs/build-repo.md
Original file line number Diff line number Diff line change
Expand Up @@ -74,54 +74,58 @@ function BuildInDir([string]$path) {
"⏳ (2/4) Executing 'cmake' to generate the Makefile..."
& cmake ..
if ($lastExitCode -ne "0") { throw "Executing 'cmake ..' has failed" }
if ($lastExitCode -ne "0") { throw "Executing 'cmake ..' exited with error code $lastExitCode" }
"⏳ (3/4) Executing 'make -j4' to compile and link..."
& make -j4
if ($lastExitCode -ne "0") { throw "Executing 'make -j4' has failed" }
if ($lastExitCode -ne "0") { throw "Executing 'make -j4' exited with error code $lastExitCode" }
"⏳ (4/4) Executing 'ctest -V' to perform tests (optional)..."
& ctest -V
if ($lastExitCode -ne "0") { throw "Executing 'make test' has failed" }
if ($lastExitCode -ne "0") { throw "Executing 'ctest -V' exited with error code $lastExitCode" }
} elseif (Test-Path "$path/configure" -pathType leaf) {
"⏳ Building 📂$dirName by using 'configure'..."
} elseif (Test-Path "$path/autogen.sh" -pathType leaf) {
"⏳ Building 📂$dirName by using 'autogen.sh'..."
Set-Location "$path/"
& ./autogen.sh --force
if ($lastExitCode -ne "0") { throw "Executing './autogen.sh --force' exited with error code $lastExitCode" }
& ./configure
#if ($lastExitCode -ne "0") { throw "Script 'configure' exited with error code $lastExitCode" }
if ($lastExitCode -ne "0") { throw "Executing './configure' exited with error code $lastExitCode" }
& make -j4
if ($lastExitCode -ne "0") { throw "Executing 'make -j4' has failed" }
if ($lastExitCode -ne "0") { throw "Executing 'make -j4' exited with error code $lastExitCode" }
& make test
if ($lastExitCode -ne "0") { throw "Executing 'make test' has failed" }
} elseif (Test-Path "$path/autogen.sh" -pathType leaf) {
"⏳ Building 📂$dirName by using 'autogen.sh'..."
} elseif (Test-Path "$path/configure" -pathType leaf) {
"⏳ Building 📂$dirName by using 'configure'..."
Set-Location "$path/"
& ./autogen.sh
if ($lastExitCode -ne "0") { throw "Script 'autogen.sh' exited with error code $lastExitCode" }
& ./configure
#if ($lastExitCode -ne "0") { throw "Executing './configure' exited with error code $lastExitCode" }
& make -j4
if ($lastExitCode -ne "0") { throw "Executing 'make -j4' has failed" }
& make test
if ($lastExitCode -ne "0") { throw "Executing 'make test' has failed" }
} elseif (Test-Path "$path/build.gradle" -pathType leaf) {
"⏳ Building 📂$dirName by using Gradle..."
Set-Location "$path"
& gradle build
if ($lastExitCode -ne "0") { throw "'gradle build' has failed" }
if ($lastExitCode -ne "0") { throw "Executing 'gradle build' exited with error code $lastExitCode" }
& gradle test
if ($lastExitCode -ne "0") { throw "'gradle test' has failed" }
if ($lastExitCode -ne "0") { throw "Executing 'gradle test' exited with error code $lastExitCode" }
} elseif (Test-Path "$path/meson.build" -pathType leaf) {
"⏳ Building 📂$dirName by using Meson..."
Set-Location "$path"
& meson . build --prefix=/usr/local
if ($lastExitCode -ne "0") { throw "'meson . build' has failed" }
if ($lastExitCode -ne "0") { throw "Executing 'meson . build' exited with error code $lastExitCode" }
} elseif (Test-Path "$path/Imakefile" -pathType leaf) {
"⏳ Building 📂$dirName by using Imakefile..."
Expand Down Expand Up @@ -152,7 +156,7 @@ function BuildInDir([string]$path) {
Set-Location "$path/"
& ./compile.sh
if ($lastExitCode -ne "0") { throw "Script 'compile.sh' exited with error code $lastExitCode" }
if ($lastExitCode -ne "0") { throw "Executing './compile.sh' exited with error code $lastExitCode" }
& make -j4
if ($lastExitCode -ne "0") { throw "Executing 'make -j4' has failed" }
Expand All @@ -162,7 +166,7 @@ function BuildInDir([string]$path) {
Set-Location "$path/attower/src/build/DevBuild/"
& ./build.bat build-all-release
if ($lastExitCode -ne "0") { throw "Script 'build.bat' exited with error code $lastExitCode" }
if ($lastExitCode -ne "0") { throw "Executing 'build.bat build-all-release' exited with error code $lastExitCode" }
} elseif (Test-Path "$path/$dirName" -pathType container) {
"⏳ No make rule found, trying subfolder 📂$($dirName)..."
Expand Down Expand Up @@ -192,4 +196,4 @@ try {
}
```

*(generated by convert-ps2md.ps1 using the comment-based help of build-repo.ps1 as of 03/27/2024 17:36:23)*
*(generated by convert-ps2md.ps1 using the comment-based help of build-repo.ps1 as of 05/19/2024 10:25:16)*
2 changes: 1 addition & 1 deletion docs/build-repos.md
Original file line number Diff line number Diff line change
Expand Up @@ -82,4 +82,4 @@ try {
}
```

*(generated by convert-ps2md.ps1 using the comment-based help of build-repos.ps1 as of 03/27/2024 17:36:23)*
*(generated by convert-ps2md.ps1 using the comment-based help of build-repos.ps1 as of 05/19/2024 10:25:16)*
2 changes: 1 addition & 1 deletion docs/cd-autostart.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,4 +60,4 @@ try {
}
```

*(generated by convert-ps2md.ps1 using the comment-based help of cd-autostart.ps1 as of 03/27/2024 17:36:23)*
*(generated by convert-ps2md.ps1 using the comment-based help of cd-autostart.ps1 as of 05/19/2024 10:25:16)*
2 changes: 1 addition & 1 deletion docs/cd-crashdumps.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,4 +63,4 @@ try {
}
```

*(generated by convert-ps2md.ps1 using the comment-based help of cd-crashdumps.ps1 as of 03/27/2024 17:36:23)*
*(generated by convert-ps2md.ps1 using the comment-based help of cd-crashdumps.ps1 as of 05/19/2024 10:25:16)*
2 changes: 1 addition & 1 deletion docs/cd-desktop.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,4 +64,4 @@ try {
}
```

*(generated by convert-ps2md.ps1 using the comment-based help of cd-desktop.ps1 as of 03/27/2024 17:36:23)*
*(generated by convert-ps2md.ps1 using the comment-based help of cd-desktop.ps1 as of 05/19/2024 10:25:16)*
2 changes: 1 addition & 1 deletion docs/cd-docs.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,4 +64,4 @@ try {
}
```

*(generated by convert-ps2md.ps1 using the comment-based help of cd-docs.ps1 as of 03/27/2024 17:36:23)*
*(generated by convert-ps2md.ps1 using the comment-based help of cd-docs.ps1 as of 05/19/2024 10:25:16)*
2 changes: 1 addition & 1 deletion docs/cd-downloads.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,4 +64,4 @@ try {
}
```

*(generated by convert-ps2md.ps1 using the comment-based help of cd-downloads.ps1 as of 03/27/2024 17:36:23)*
*(generated by convert-ps2md.ps1 using the comment-based help of cd-downloads.ps1 as of 05/19/2024 10:25:16)*
2 changes: 1 addition & 1 deletion docs/cd-dropbox.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,4 +60,4 @@ try {
}
```

*(generated by convert-ps2md.ps1 using the comment-based help of cd-dropbox.ps1 as of 03/27/2024 17:36:23)*
*(generated by convert-ps2md.ps1 using the comment-based help of cd-dropbox.ps1 as of 05/19/2024 10:25:16)*
2 changes: 1 addition & 1 deletion docs/cd-etc.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,4 +64,4 @@ try {
}
```

*(generated by convert-ps2md.ps1 using the comment-based help of cd-etc.ps1 as of 03/27/2024 17:36:23)*
*(generated by convert-ps2md.ps1 using the comment-based help of cd-etc.ps1 as of 05/19/2024 10:25:16)*
2 changes: 1 addition & 1 deletion docs/cd-fonts.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,4 +60,4 @@ try {
}
```

*(generated by convert-ps2md.ps1 using the comment-based help of cd-fonts.ps1 as of 03/27/2024 17:36:23)*
*(generated by convert-ps2md.ps1 using the comment-based help of cd-fonts.ps1 as of 05/19/2024 10:25:16)*
2 changes: 1 addition & 1 deletion docs/cd-home.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,4 +60,4 @@ try {
}
```

*(generated by convert-ps2md.ps1 using the comment-based help of cd-home.ps1 as of 03/27/2024 17:36:23)*
*(generated by convert-ps2md.ps1 using the comment-based help of cd-home.ps1 as of 05/19/2024 10:25:16)*
2 changes: 1 addition & 1 deletion docs/cd-logs.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,4 +48,4 @@ try {
}
```

*(generated by convert-ps2md.ps1 using the comment-based help of cd-logs.ps1 as of 03/27/2024 17:36:23)*
*(generated by convert-ps2md.ps1 using the comment-based help of cd-logs.ps1 as of 05/19/2024 10:25:16)*
2 changes: 1 addition & 1 deletion docs/cd-music.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,4 +64,4 @@ try {
}
```

*(generated by convert-ps2md.ps1 using the comment-based help of cd-music.ps1 as of 03/27/2024 17:36:23)*
*(generated by convert-ps2md.ps1 using the comment-based help of cd-music.ps1 as of 05/19/2024 10:25:16)*
2 changes: 1 addition & 1 deletion docs/cd-onedrive.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,4 +60,4 @@ try {
}
```

*(generated by convert-ps2md.ps1 using the comment-based help of cd-onedrive.ps1 as of 03/27/2024 17:36:23)*
*(generated by convert-ps2md.ps1 using the comment-based help of cd-onedrive.ps1 as of 05/19/2024 10:25:17)*
2 changes: 1 addition & 1 deletion docs/cd-pics.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,4 +62,4 @@ try {
}
```

*(generated by convert-ps2md.ps1 using the comment-based help of cd-pics.ps1 as of 03/27/2024 17:36:23)*
*(generated by convert-ps2md.ps1 using the comment-based help of cd-pics.ps1 as of 05/19/2024 10:25:17)*
2 changes: 1 addition & 1 deletion docs/cd-public.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,4 +62,4 @@ try {
}
```

*(generated by convert-ps2md.ps1 using the comment-based help of cd-public.ps1 as of 03/27/2024 17:36:23)*
*(generated by convert-ps2md.ps1 using the comment-based help of cd-public.ps1 as of 05/19/2024 10:25:17)*
14 changes: 7 additions & 7 deletions docs/cd-recycle-bin.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ Script Content
```powershell
<#
.SYNOPSIS
Sets the working directory to the user's recycle bin folder
Sets the working directory to the recycle bin folder
.DESCRIPTION
This PowerShell script changes the working directory to the user's recycle bin folder.
.EXAMPLE
Expand All @@ -39,18 +39,18 @@ function GetCurrentUserSID { [CmdletBinding()] param()
try {
if ($IsLinux) {
$Path = "$HOME/.local/share/Trash/"
$path = "$HOME/.local/share/Trash/"
} else {
$Path = "C:\$Recycle.Bin\" + "$(GetCurrentUserSID)"
$path = "C:\`$Recycle.Bin\$(GetCurrentUserSID)"
}
if (-not(Test-Path "$Path" -pathType container)) { throw "Recycle bin folder at 📂$Path doesn't exist (yet)" }
Set-Location "$Path"
"📂$Path"
if (-not(Test-Path "$path" -pathType container)) { throw "Recycle bin folder at 📂$path doesn't exist (yet)" }
Set-Location "$path"
"📂$path"
exit 0 # success
} catch {
"⚠️ Error in line $($_.InvocationInfo.ScriptLineNumber): $($Error[0])"
exit 1
}
```

*(generated by convert-ps2md.ps1 using the comment-based help of cd-recycle-bin.ps1 as of 03/27/2024 17:36:23)*
*(generated by convert-ps2md.ps1 using the comment-based help of cd-recycle-bin.ps1 as of 05/19/2024 10:25:17)*
93 changes: 93 additions & 0 deletions docs/cd-repo.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,93 @@
Script: *cd-repo.ps1*
========================

This PowerShell script changes the working directory to a Git repository.

Parameters
----------
```powershell
PS> ./cd-repo.ps1 [[-folderName] <String>] [<CommonParameters>]
-folderName <String>
Specifies the folder name
Required? false
Position? 1
Default value
Accept pipeline input? false
Accept wildcard characters? false
[<CommonParameters>]
This script supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction,
WarningVariable, OutBuffer, PipelineVariable, and OutVariable.
```

Example
-------
```powershell
PS> ./cd-repo.ps1 rust
📂C:\Repos\rust • on Git branch: ## main ... origin/main
```

Notes
-----
Author: Markus Fleschutz | License: CC0

Related Links
-------------
https://github.com/fleschutz/PowerShell

Script Content
--------------
```powershell
<#
.SYNOPSIS
Sets the working directory to a repository
.DESCRIPTION
This PowerShell script changes the working directory to a Git repository.
.PARAMETER folderName
Specifies the folder name
.EXAMPLE
PS> ./cd-repo.ps1 rust
📂C:\Repos\rust • on Git branch: ## main ... origin/main
.LINK
https://github.com/fleschutz/PowerShell
.NOTES
Author: Markus Fleschutz | License: CC0
#>
param([string]$folderName = "")
try {
if ("$folderName" -eq "") { $folderName = Read-Host "Enter the folder name" }
if (Test-Path "$HOME/Repos/" -pathType Container) { # try short name
$path = "$HOME/Repos/"
} elseif (Test-Path "$HOME/repos/" -pathType Container) {
$path = "$HOME/repos/"
} elseif (Test-Path "$HOME/Repositories/" -pathType Container) { # try long name
$path = "$HOME/Repositories/"
} elseif (Test-Path "$HOME/source/repos/" -pathType Container) { # try Visual Studio default
$path = "$HOME/source/repos/"
} elseif (Test-Path "/Repos/" -pathType Container) {
$path = "/Repos/"
} else {
throw "The folder for Git repositories doesn't exist (yet)"
}
$path += $folderName
if (-not(Test-Path "$path" -pathType Container)) { throw "The path to 📂$path doesn't exist (yet)" }
$path = Resolve-Path "$path"
Set-Location "$path"
Write-Host "📂$path • on Git branch: " -noNewline
& git status --short --branch --show-stash
exit 0 # success
} catch {
"⚠️ Error: $($Error[0])"
exit 1
}
```

*(generated by convert-ps2md.ps1 using the comment-based help of cd-repo.ps1 as of 05/19/2024 10:25:17)*
Loading

0 comments on commit 439fbf5

Please sign in to comment.