From: Martin DeMello Date: 2003-08-10T16:13:51+09:00 Subject: CVS add Just learning my way around CVS - is this missing anything? It seems to work, but that's just programming by coincidence :) # recursive cvs add require 'find' def cvs_addable?(file) !(['.','..','CVS'].include?(File.basename(file))) end dirs = [] Find.find (ARGV[0]) {|file| if FileTest.directory?(file) a << file if cvs_addable?(file) end } dirs.each {|dir| Dir.chdir(dir) puts "cd #{dir}" Dir.foreach('.') {|file| system("cvs add #{file}") if cvs_addable?(file) } }