Improved update-repos.csv

This commit is contained in:
Markus Fleschutz 2021-01-20 16:38:46 +01:00
parent 15a98fd9d1
commit b5f18e62b5
4 changed files with 6 additions and 5 deletions

View File

@ -7,5 +7,5 @@ URL,Directory
"https://github.com/fleschutz/CWTS", "CWTS"
"https://github.com/fleschutz/PowerShell", "PowerShell"
"https://github.com/fleschutz/LSS", "LSS"
"https://github.com/fleschutz/eventdriven", "eventdriven"
"https://github.com/fleschutz/event-driven", "event-driven"
"https://github.com/fleschutz/base256unicode", "base256unicode"

1 URL Directory
7 https://github.com/fleschutz/CWTS CWTS
8 https://github.com/fleschutz/PowerShell PowerShell
9 https://github.com/fleschutz/LSS LSS
10 https://github.com/fleschutz/eventdriven https://github.com/fleschutz/event-driven eventdriven event-driven
11 https://github.com/fleschutz/base256unicode base256unicode

View File

@ -14,7 +14,7 @@ try {
foreach($Row in $Table) {
$URL = $Row.URL
write-output ""
write-output "Cloning $URL..."
write-output "Cloning from $URL..."
git clone $URL
}

View File

@ -11,7 +11,7 @@ param([string]$Dir = "")
function ListDirectory { param([string]$Path)
$Items = get-childItem -path $Path
foreach ($Item in $Items) {
if ($Item.Mode -eq "d-----") {
if ($Item.Mode -eq "d----") {
New-Object PSObject -Property @{ Filename = "$($Item.Name)/" }
} else {
New-Object PSObject -Property @{ Filename = "$($Item.Name)" }

View File

@ -14,14 +14,15 @@ try {
}
$Items = get-childItem -path $Directory
foreach ($Item in $Items) {
if ($Item.Mode -eq "d-----") {
if ($Item.Mode -eq "d----") {
$Filename = $Item.Name
write-host ""
write-host -nonewline "Updating $Filename ..."
set-location $Filename
git pull
set-location ..
}
}
write-output "Done."
exit 0
} catch {
write-error "ERROR in line $($_.InvocationInfo.ScriptLineNumber): $($Error[0])"