mirror of
https://github.com/fleschutz/PowerShell.git
synced 2025-04-08 09:20:19 +02:00
Improved update-repos.csv
This commit is contained in:
parent
15a98fd9d1
commit
b5f18e62b5
@ -7,5 +7,5 @@ URL,Directory
|
|||||||
"https://github.com/fleschutz/CWTS", "CWTS"
|
"https://github.com/fleschutz/CWTS", "CWTS"
|
||||||
"https://github.com/fleschutz/PowerShell", "PowerShell"
|
"https://github.com/fleschutz/PowerShell", "PowerShell"
|
||||||
"https://github.com/fleschutz/LSS", "LSS"
|
"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"
|
"https://github.com/fleschutz/base256unicode", "base256unicode"
|
||||||
|
|
@ -14,7 +14,7 @@ try {
|
|||||||
foreach($Row in $Table) {
|
foreach($Row in $Table) {
|
||||||
$URL = $Row.URL
|
$URL = $Row.URL
|
||||||
write-output ""
|
write-output ""
|
||||||
write-output "Cloning $URL..."
|
write-output "Cloning from $URL..."
|
||||||
git clone $URL
|
git clone $URL
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -11,7 +11,7 @@ param([string]$Dir = "")
|
|||||||
function ListDirectory { param([string]$Path)
|
function ListDirectory { param([string]$Path)
|
||||||
$Items = get-childItem -path $Path
|
$Items = get-childItem -path $Path
|
||||||
foreach ($Item in $Items) {
|
foreach ($Item in $Items) {
|
||||||
if ($Item.Mode -eq "d-----") {
|
if ($Item.Mode -eq "d----") {
|
||||||
New-Object PSObject -Property @{ Filename = "$($Item.Name)/" }
|
New-Object PSObject -Property @{ Filename = "$($Item.Name)/" }
|
||||||
} else {
|
} else {
|
||||||
New-Object PSObject -Property @{ Filename = "$($Item.Name)" }
|
New-Object PSObject -Property @{ Filename = "$($Item.Name)" }
|
||||||
|
@ -14,14 +14,15 @@ try {
|
|||||||
}
|
}
|
||||||
$Items = get-childItem -path $Directory
|
$Items = get-childItem -path $Directory
|
||||||
foreach ($Item in $Items) {
|
foreach ($Item in $Items) {
|
||||||
if ($Item.Mode -eq "d-----") {
|
if ($Item.Mode -eq "d----") {
|
||||||
$Filename = $Item.Name
|
$Filename = $Item.Name
|
||||||
|
write-host ""
|
||||||
|
write-host -nonewline "Updating $Filename ..."
|
||||||
set-location $Filename
|
set-location $Filename
|
||||||
git pull
|
git pull
|
||||||
set-location ..
|
set-location ..
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
write-output "Done."
|
|
||||||
exit 0
|
exit 0
|
||||||
} catch {
|
} catch {
|
||||||
write-error "ERROR in line $($_.InvocationInfo.ScriptLineNumber): $($Error[0])"
|
write-error "ERROR in line $($_.InvocationInfo.ScriptLineNumber): $($Error[0])"
|
||||||
|
Loading…
Reference in New Issue
Block a user