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