Skip to content

Instantly share code, notes, and snippets.

@mweppler
Created October 6, 2012 21:34
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 mweppler/3846208 to your computer and use it in GitHub Desktop.
Save mweppler/3846208 to your computer and use it in GitHub Desktop.
Recursively remove .svn directories for given path
#!/usr/bin/env ruby
%w{fileutils}.each { |lib| require lib }
Dir.glob((ARGV[0][-1] == '/') ? ARGV[0] + '**/*' : ARGV[0] + '/**/*', File::FNM_DOTMATCH) { |node| FileUtils.rm_rf node if File.directory?(node) && File.basename(node) =~ /\.svn$/ }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment