Guest User

Untitled

a guest
Apr 21st, 2018
80
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.05 KB | None | 0 0
  1. # ###################################################################################
  2. # Powershell script to transform the .gitignore config to be subversion compatible and
  3. # apply it to the subversion global-ignores configuration.
  4. #
  5. # Author: Filip De Vos
  6. # Last updated: 3 Oct 2011
  7. #
  8. # License: WTFPL
  9. #
  10. # Compatibility: Tested on Windows 7 with 'powershell apply_to_svn_config.ps1'
  11. #
  12. # to use this script just call it from the same folder as your .gitignore file.
  13. # If you don't like specifying the full path to the script you need to enable
  14. # the executionpolicy remotesigned
  15. #
  16. # Notes: This script is very naive because I totally stink at powershell scripting.
  17. #
  18. # ###################################################################################
  19.  
  20. $content = get-content .gitignore | Where-Object {$_ -notlike '#*'}
  21. $line = [string]::join(" ", $content)
  22. $path = $env:USERPROFILE + "\AppData\Roaming\Subversion\config"
  23. (Get-Content ($path)) | Foreach-Object {$_ -replace '^global-ignores = .*$', ("global-ignores = " + $line)} | Set-Content ($path)
Add Comment
Please, Sign In to add comment