Improved the scripts

This commit is contained in:
Markus Fleschutz
2021-02-28 18:49:53 +01:00
parent 032113200c
commit ab6a0ce13f
5 changed files with 38 additions and 32 deletions

View File

@ -1,11 +1,13 @@
#!/bin/powershell
<#
.SYNTAX ./clone-repos.ps1
.DESCRIPTION clones well-known Git repositories into the current directory.
.SYNTAX ./clone-repos.ps1 [<target-dir>]
.DESCRIPTION clones well-known Git repositories into the current/given directory.
.LINK https://github.com/fleschutz/PowerShell
.NOTES Author: Markus Fleschutz / License: CC0
#>
param($TargetDir = "$PWD")
try {
& git --version
} catch {
@ -17,6 +19,7 @@ try {
$PathToRepo = "$PSScriptRoot/.."
$Table = import-csv "$PathToRepo/Data/repos.csv"
set-location $TargetDir
foreach($Row in $Table) {
$URL = $Row.URL
$Directory = $Row.Directory