diff -ur rubywebdialogs-0.0.4.tar.gz/rubywebdialogs/init.rb rubywebdialogs-0.0.5.tar.gz/rubywebdialogs/init.rb --- rubywebdialogs-0.0.4.tar.gz/rubywebdialogs/init.rb 2004-04-23 00:08:14.000000000 +0200 +++ rubywebdialogs-0.0.5.tar.gz/rubywebdialogs/init.rb 2004-04-23 11:11:25.000000000 +0200 @@ -1,39 +1,24 @@ require "rbconfig" -Reversed = (ARGV.include?("-r")) - -FromDirs = ENV["PATH"].split(/:/) + [".", "./lib", "./rubylib/lib"] +FromDirs = [".", "./lib", "./rubylib/lib"] ToDir = Config::CONFIG["sitelibdir"] + "/ev" Dir.mkdir(ToDir) if not File.directory?(ToDir) FromDirs.each do |fromdir| fromdir = Dir.pwd if fromdir == "." + if File.directory?(fromdir) Dir.new(fromdir).each do |file| - if not file.scan(/\.lib\.rb$/).empty? + if file =~ /\.lib\.rb$/ fromfile = fromdir + "/" + file tofile = ToDir + "/" + file.sub(/\.lib\.rb/, ".rb") - if not (File.directory?("c:/")) - printf "%s -> %s\n", fromfile, tofile + printf "%s -> %s\n", fromfile, tofile + + File.delete(tofile) if File.file?(tofile) - File.unlink(tofile) if File.symlink?(tofile) - File.symlink(fromfile, tofile) - else - if Reversed - tofile, fromfile = fromfile, tofile - end - - if FileTest.file?(fromfile) - printf "%s -> %s\n", fromfile, tofile - - File.delete(tofile) if File.writable?(tofile) - File.open(tofile, "w") {|f| f.puts File.new(fromfile).readlines} - else - printf "%s -> %s (Skipped!)\n", fromfile, tofile - end - end + File.open(tofile, "w") {|f| f.puts File.new(fromfile).readlines} end end end diff -ur rubywebdialogs-0.0.4.tar.gz/rubywebdialogs/install.rb rubywebdialogs-0.0.5.tar.gz/rubywebdialogs/install.rb --- rubywebdialogs-0.0.4.tar.gz/rubywebdialogs/install.rb 2004-04-23 00:08:14.000000000 +0200 +++ rubywebdialogs-0.0.5.tar.gz/rubywebdialogs/install.rb 2004-04-23 11:11:25.000000000 +0200 @@ -1,39 +1,24 @@ require "rbconfig" -Reversed = (ARGV.include?("-r")) - -FromDirs = ENV["PATH"].split(/:/) + [".", "./lib", "./rubylib/lib"] +FromDirs = [".", "./lib", "./rubylib/lib"] ToDir = Config::CONFIG["sitelibdir"] + "/ev" Dir.mkdir(ToDir) if not File.directory?(ToDir) FromDirs.each do |fromdir| fromdir = Dir.pwd if fromdir == "." + if File.directory?(fromdir) Dir.new(fromdir).each do |file| - if not file.scan(/\.lib\.rb$/).empty? + if file =~ /\.lib\.rb$/ fromfile = fromdir + "/" + file tofile = ToDir + "/" + file.sub(/\.lib\.rb/, ".rb") - if not (File.directory?("c:/")) - printf "%s -> %s\n", fromfile, tofile + printf "%s -> %s\n", fromfile, tofile + + File.delete(tofile) if File.file?(tofile) - File.unlink(tofile) if File.symlink?(tofile) - File.symlink(fromfile, tofile) - else - if Reversed - tofile, fromfile = fromfile, tofile - end - - if FileTest.file?(fromfile) - printf "%s -> %s\n", fromfile, tofile - - File.delete(tofile) if File.writable?(tofile) - File.open(tofile, "w") {|f| f.puts File.new(fromfile).readlines} - else - printf "%s -> %s (Skipped!)\n", fromfile, tofile - end - end + File.open(tofile, "w") {|f| f.puts File.new(fromfile).readlines} end end end