Suppress require 'FileUtils' warning

The message "warning: already initialized constant OPT_TABLE" is due to
the non-case-sensitive HFS+ filesystem, and the Pathname module
including FileUtils as fileutils.
This commit is contained in:
Max Howell 2009-05-21 01:15:47 +01:00
parent 84c5c3e5c3
commit 5b3e0978ea
3 changed files with 7 additions and 7 deletions

View File

@ -1,8 +1,8 @@
#!/usr/bin/ruby #!/usr/bin/ruby
# Copyright 2009 Max Howell <max@methylblue.com> # Copyright 2009 Max Howell <max@methylblue.com>
# Licensed as per the GPL version 3 # Licensed as per the GPL version 3
require 'Find' require 'find'
require 'Pathname' require 'pathname'
$root = Pathname.new(__FILE__).realpath.dirname.parent.parent $root = Pathname.new(__FILE__).realpath.dirname.parent.parent
case ARGV[0] case ARGV[0]
@ -36,7 +36,7 @@ case ARGV[0]
$root.find do |path| $root.find do |path|
if path.directory? if path.directory?
name=path.basename name=path.basename
Find.prune if name == 'brews' or name == 'yeasts' Find.prune if name == 'Cellar' or name == 'Formula'
elsif path.symlink? elsif path.symlink?
path.unlink unless path.readlink.exist? path.unlink unless path.readlink.exist?
end end

View File

@ -1,8 +1,8 @@
# Copyright 2009 Max Howell <max@methylblue.com> # Copyright 2009 Max Howell <max@methylblue.com>
# Licensed as per the GPL version 3 # Licensed as per the GPL version 3
require 'FileUtils' require 'find'
require 'Find' require 'pathname'
require 'Pathname' require 'fileutils'
$agent = "Homebrew 0.1 (Ruby; Mac OS X 10.5 Leopard)" $agent = "Homebrew 0.1 (Ruby; Mac OS X 10.5 Leopard)"
$cellar = Pathname.new(__FILE__).dirname.parent.realpath $cellar = Pathname.new(__FILE__).dirname.parent.realpath

View File

@ -1,6 +1,6 @@
$:.unshift "#{File.dirname __FILE__}/../Cellar/homebrew" #rubysucks $:.unshift "#{File.dirname __FILE__}/../Cellar/homebrew" #rubysucks
require 'brewkit' require 'brewkit'
require 'FileUtils' require 'fileutils'
def profile_string def profile_string
<<-sput <<-sput