Recursively remove .svn directories (ruby script)
require 'find' require 'fileutils' Find.find('./') do |path| if File.basename(path) == '.svn' FileUtils.remove_dir(path, true) Find.prune end end
TextSnippets > HelgeG > ruby
1159 users tagging and storing useful source code snippets
Helge A. Gudmundsen http://www.helgegudmundsen.com
require 'find' require 'fileutils' Find.find('./') do |path| if File.basename(path) == '.svn' FileUtils.remove_dir(path, true) Find.prune end end