-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpull-all.ps1
36 lines (32 loc) · 1019 Bytes
/
pull-all.ps1
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
function Test-Dir {
param ([string]$Dir)
$PrevDir = (Get-Location)
Set-Location $Dir
if (Test-Path -Path ".svn" -PathType Container) {
Write-Output ("========== {0} ==========" -f (Get-Location))
#svn st
Write-Output ("NOT IMPLEMENTED")
}
elseif (Test-Path -Path ".git" -PathType Container) {
Write-Output ("========== {0} ==========" -f (Get-Location))
git pull
}
elseif (Test-Path -Path ".bzr" -PathType Container) {
Write-Output ("========== {0} ==========" -f (Get-Location))
#bzr st
Write-Output ("NOT IMPLEMENTED")
}
elseif (Test-Path -Path ".hg" -PathType Container) {
Write-Output ("========== {0} ==========" -f (Get-Location))
#hg st
Write-Output ("NOT IMPLEMENTED")
}
else {
$subDirs = Get-ChildItem -Path $Dir -Directory
foreach ($subDir in $subDirs) {
Test-Dir -Dir $subDir.FullName
}
}
Set-Location $PrevDir
}
Test-Dir -Dir (Get-Location)