mirror of
https://github.com/Homebrew/brew.git
synced 2025-07-14 16:09:03 +08:00
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:
parent
84c5c3e5c3
commit
5b3e0978ea
@ -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
|
||||||
|
@ -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
|
||||||
|
|
||||||
|
@ -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
|
||||||
|
Loading…
x
Reference in New Issue
Block a user