Improve the scripts

This commit is contained in:
Markus Fleschutz 2021-05-17 19:53:40 +02:00
parent 61900ec1d9
commit 6ee8ea905f
6 changed files with 11 additions and 10 deletions

View File

@ -11,6 +11,7 @@ URL,Directory
"https://github.com/llvm/llvm-project", "llvm"
"https://github.com/smartmontools/smartmontools", "smartmontools"
"https://github.com/synesthesiam/voice2json", "voice2json"
"https://github.com/tensorflow/tensorflow", "tensorflow"
"https://github.com/TinyCC/tinycc", "tinycc"
"https://github.com/opencv/opencv", "opencv"
"https://github.com/openzfs/zfs", "zfs"

1 URL Directory
11 https://github.com/llvm/llvm-project llvm
12 https://github.com/smartmontools/smartmontools smartmontools
13 https://github.com/synesthesiam/voice2json voice2json
14 https://github.com/tensorflow/tensorflow tensorflow
15 https://github.com/TinyCC/tinycc tinycc
16 https://github.com/opencv/opencv opencv
17 https://github.com/openzfs/zfs zfs

View File

@ -1,8 +1,6 @@
Script,Description
add-firewall-rules.ps1, adds firewall rules to the given executables (needs admin rights)
add-memo.ps1, adds the given memo text to $HOME/Memos.csv
build-repo.ps1, builds the current/given Git repository
build-repos.ps1, builds all Git repositories under the current/given directory
cd-desktop.ps1, go to the user's desktop folder
cd-docs.ps1, go to the user's documents folder
cd-downloads.ps1, go to the user's downloads folder
@ -132,6 +130,8 @@ locate-ipaddress.ps1, prints the geographic location of the given IP address
locate-zip-code.ps1, prints the geographic location of the given zip-code
MD5.ps1, prints the MD5 checksum of the given file
make-install.ps1, installs built executables and libs to the installation directory
make-repo.ps1, builds the current/given Git repository
make-repos.ps1, builds all Git repositories under the current/given directory
moon.ps1, prints the current moon phase
mute-audio.ps1, mutes audio
next-joke.ps1], gets the next random Juck Norris joke

1 Script Description
2 add-firewall-rules.ps1 adds firewall rules to the given executables (needs admin rights)
3 add-memo.ps1 adds the given memo text to $HOME/Memos.csv
build-repo.ps1 builds the current/given Git repository
build-repos.ps1 builds all Git repositories under the current/given directory
4 cd-desktop.ps1 go to the user's desktop folder
5 cd-docs.ps1 go to the user's documents folder
6 cd-downloads.ps1 go to the user's downloads folder
130 locate-zip-code.ps1 prints the geographic location of the given zip-code
131 MD5.ps1 prints the MD5 checksum of the given file
132 make-install.ps1 installs built executables and libs to the installation directory
133 make-repo.ps1 builds the current/given Git repository
134 make-repos.ps1 builds all Git repositories under the current/given directory
135 moon.ps1 prints the current moon phase
136 mute-audio.ps1 mutes audio
137 next-joke.ps1] gets the next random Juck Norris joke

View File

@ -139,8 +139,6 @@ Mega Collection of PowerShell Scripts
📝 PowerShell Scripts for Git
------------------------------
* [build-repo.ps1](Scripts/build-repo.ps1) - builds the current/given Git repository
* [build-repos.ps1](Scripts/build-repos.ps1) - builds all Git repositories under the current/given directory
* [cherry-picker.ps1](Scripts/cherry-picker.ps1) - cherry-picks a Git commit into multiple branches
* [clean-repo.ps1](Scripts/clean-repo.ps1) - cleans the current/given Git repository from untracked files (including submodules)
* [clean-repos.ps1](Scripts/clean-repos.ps1) - cleans all Git repositories under the current/given directory from untracked files (including submodules)
@ -155,6 +153,8 @@ Mega Collection of PowerShell Scripts
* [list-latest-tag.ps1](Scripts/list-latest-tag.ps1) - lists the latest tag on the current branch in a Git repository
* [list-submodules.ps1](Scripts/list-submodules.ps1) - lists the submodules of the current/given Git repository
* [list-tags.ps1](Scripts/list-tags.ps1) - lists all tags in the current/given Git repository
* [make-repo.ps1](Scripts/make-repo.ps1) - builds the current/given Git repository
* [make-repos.ps1](Scripts/make-repos.ps1) - builds all Git repositories under the current/given directory
* [pull-repo.ps1](Scripts/pull-repo.ps1) - pulls updates for the current/given Git repository (including submodules)
* [pull-repos.ps1](Scripts/pull-repos.ps1) - pulls updates for all Git repositories under the current/given directory (including submodules)
* [switch-branch.ps1](Scripts/switch-branch.ps1) - switches the branch in the current/given Git repository (including submodules)

View File

@ -22,10 +22,10 @@ try {
$URL = $Row.URL
$DirName = $Row.Directory
if (test-path "$ParentDir/$DirName" -pathType container) {
"Skipping 📂$DirName because it exists already ..."
"Skipping 📂$DirName (exists already)..."
continue
}
"⏳ Cloning $URL to 📂$DirName ..."
"⏳ Cloning $URL to 📂$($DirName)..."
& git clone --recurse-submodules "$URL" "$ParentDir/$DirName"
if ($lastExitCode -ne "0") { throw "'git clone $URL' failed" }
$Count++

View File

@ -1,6 +1,6 @@
<#
.SYNTAX build-repo.ps1 [<repo-dir>]
.DESCRIPTION builds a Git repository (supporting cmake,configure,autogen,Imakefile,Makefile)
.SYNTAX make-repo.ps1 [<repo-dir>]
.DESCRIPTION builds a Git repository supporting cmake,configure,autogen,Imakefile,Makefile
.LINK https://github.com/fleschutz/PowerShell
.NOTES Author: Markus Fleschutz / License: CC0
#>

View File

@ -1,5 +1,5 @@
<#
.SYNTAX build-repos.ps1 [<parent-dir>]
.SYNTAX make-repos.ps1 [<parent-dir>]
.DESCRIPTION builds all Git repositories under the current/given directory
.LINK https://github.com/fleschutz/PowerShell
.NOTES Author: Markus Fleschutz / License: CC0
@ -17,7 +17,7 @@ try {
"Building $($Folders.Count) Git repositories at 📂$ParentDirName..."
foreach ($Folder in $Folders) {
& "$PSScriptRoot/build-repo.ps1" "$Folder"
& "$PSScriptRoot/make-repo.ps1" "$Folder"
}
[int]$Elapsed = $StopWatch.Elapsed.TotalSeconds