Skip to content

Instantly share code, notes, and snippets.

@asbjornu
Created December 6, 2011 09:17
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save asbjornu/1437509 to your computer and use it in GitHub Desktop.
Save asbjornu/1437509 to your computer and use it in GitHub Desktop.
Move C# files into namespace folders with Subversion
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