Created
December 6, 2011 09:17
-
-
Save asbjornu/1437509 to your computer and use it in GitHub Desktop.
Move C# files into namespace folders with Subversion
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Dir.glob("*.cs") do | file | | |
target = file.split('.').map { | segment | | |
if segment != "cs" | |
segment | |
end | |
}.compact.join('/') | |
if target.index('Generated') | |
target['/Generated'] = '' | |
target = 'Generated/' + target | |
else | |
target = 'NonGenerated/' + target | |
end | |
target += '.cs' | |
system "svn move #{file} #{target}" | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment