Skip to content

Instantly share code, notes, and snippets.

@nickel
Created June 28, 2009 16:34
Show Gist options
  • Save nickel/137308 to your computer and use it in GitHub Desktop.
Save nickel/137308 to your computer and use it in GitHub Desktop.
# DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
# Version 2, December 2004
#
# Copyright (C) 2004 Sam Hocevar
# 14 rue de Plaisance, 75014 Paris, France
# Everyone is permitted to copy and distribute verbatim or modified
# copies of this license document, and changing it is allowed as long
# as the name is changed.
#
# DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
# TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
#
# 0. You just DO WHAT THE FUCK YOU WANT TO.
# Created at 24/08/2007 by Juan Gallego.
require 'fileutils'
def borra
begin
if (!ARGV[0])
puts "usage: ruby pulveriza-svn.rb directorio"
else
Dir.chdir(ARGV[0])
svn_dirs = File.join("**", ".svn")
Dir.glob(svn_dirs) {|svn_dir|
FileUtils.rm_rf(svn_dir)
puts "#{svn_dir}: borrado"
}
end
rescue
puts "El directorio #{ARGV[0]} no existe"
end
end
borra
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment