#!/usr/bin/ruby -w
$dirs_to_fetch = []
$checked = 0
def fetcher(dir)
Dir.foreach(dir) do |file|
file.gsub!(/\.\./, "")
`mv #{dir}/#{file} #{dir}/#{file.downcase}` if file != "vimoco.rb" && file.downcase != file
$dirs_to_fetch.push(file.downcase) if File.directory?(file) && file != "."
end
$checked += 1
end
fetcher(".")
$dirs_to_fetch.each do |e|
fetcher(e)
end
puts "Zrobione! #{$checked} plikow sprawdzono i ewentualnie zmieniono."