Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $user = $args[1]
- $password = $args[3]
- $repo = $args[5]
- $exclude = @("js","img","images","css","xml","style")
- cd "D:\tmp"
- svn co http://xxxxxxxxxxx/svn/$repo/trunk D:/tmp/$repo --depth immediates --username $user --password $password
- cd $repo
- $items = Get-ChildItem -Path "D:/tmp/"$repo"/"
- $folders = @()
- # enumerate the items array
- foreach ($item in $items)
- {
- # if the item is a directory, then process it.
- if ($item.Attributes -eq "Directory")
- {
- $found = "0"
- for ( $i = 0 ; $i -lt $exclude.length; $i++ )
- {
- if($item.Name -eq $exclude[$i])
- {
- $found = "1"
- }
- }
- if($found -eq "0")
- {
- $folders += ".\" + $item.Name
- }
- }
- }
- for ( $i = 0 ; $i -lt $folders.length; $i++ )
- {
- svn up --set-depth=infinity $folders[$i]
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement