mirror of
https://github.com/fleschutz/PowerShell.git
synced 2024-11-08 17:14:28 +01: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/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"
|
||||
|
|
@ -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
|
||||
}
|
||||
|
||||
|
@ -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)" }
|
||||
|
@ -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])"
|
||||
|
Loading…
Reference in New Issue
Block a user