Advertisement
Guest User

Untitled

a guest
Jun 5th, 2015
311
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. $user = $args[1]
  2. $password = $args[3]
  3. $repo = $args[5]
  4.  
  5. $exclude = @("js","img","images","css","xml","style")
  6.  
  7. cd "D:\tmp"
  8.  
  9. svn co http://xxxxxxxxxxx/svn/$repo/trunk D:/tmp/$repo --depth immediates --username $user --password $password
  10.  
  11. cd $repo
  12.  
  13. $items = Get-ChildItem -Path "D:/tmp/"$repo"/"
  14.  
  15. $folders = @()
  16.  
  17. # enumerate the items array
  18. foreach ($item in $items)
  19. {
  20.     # if the item is a directory, then process it.
  21.     if ($item.Attributes -eq "Directory")
  22.     {
  23.         $found = "0"
  24.         for ( $i = 0 ; $i -lt $exclude.length; $i++ )
  25.         {
  26.             if($item.Name -eq $exclude[$i])
  27.             {
  28.                 $found = "1"
  29.             }
  30.         }
  31.         if($found -eq "0")
  32.         {
  33.             $folders += ".\" + $item.Name
  34.         }
  35.     }
  36. }
  37.  
  38. for ( $i = 0 ; $i -lt $folders.length; $i++ )
  39. {
  40.     svn up --set-depth=infinity $folders[$i]
  41. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement