_________ / Zatta /extensionsAllUpdate.ps1
Default38693's picture
Upload 2 files
d3e109a
$parentDir = "H:\WEBUI\extensions"
# ディレクトリ内のすべてのサブディレクトリを取得
$subDirs = Get-ChildItem -Path $parentDir -Directory
# 各サブディレクトリに対してカレントディレクトリを変更し、git pullを実行
foreach ($dir in $subDirs) {
# .gitディレクトリが存在するかを確認
if (Test-Path -Path "$($dir.FullName)\.git") {
Set-Location -Path $dir.FullName
git pull
Set-Location -Path $parentDir
}
else {
Write-Host "Skipping $dir, no .git directory found."
}
}
Read-Host