mirror of
https://github.com/fleschutz/PowerShell.git
synced 2025-08-08 20:54:38 +02:00
Improved update-repos.csv
This commit is contained in:
@ -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])"
|
||||
|
Reference in New Issue
Block a user