$: << './lib'
require 'logger'
RAILS_DEFAULT_LOGGER = Logger.new(nil)
require 'cruise_control/log'
require 'command_line'

VERBOTTEN_PATHS = ['.svn', /^script/, /^builds/, /^cruise.cmd$/, /^log/, /.iml$/, /.ipr$/, /.cmd$/, 
                   'svn-repo', /^tmp/, /^cruise$/]

Dir['**/*'].each do |path|
  if File.file?(path) and 
     not VERBOTTEN_PATHS.any? do |verbotten_path| 
       verbotten_path.is_a?(Regexp) ? path =~ verbotten_path : path.include?(verbotten_path)
     end
    begin
    	CommandLine.execute "svn propset svn:eol-style native #{path}" 
    	puts "OK"
    rescue => e
      puts "FAILED: #{e.message}"
    end
  end
end
