Use + instead of /.
This commit is contained in:
parent
761cbd3dab
commit
2a5f757816
@ -3,7 +3,7 @@ module Homebrew extend self
|
|||||||
if ARGV.named.empty?
|
if ARGV.named.empty?
|
||||||
puts HOMEBREW_CELLAR
|
puts HOMEBREW_CELLAR
|
||||||
else
|
else
|
||||||
puts ARGV.formulae.map{ |f| HOMEBREW_CELLAR/f }
|
puts ARGV.formulae.map{ |f| HOMEBREW_CELLAR+f }
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
@ -21,7 +21,7 @@ module Homebrew extend self
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
prefix = HOMEBREW_CELLAR/name/version
|
prefix = HOMEBREW_CELLAR+name+version
|
||||||
|
|
||||||
if File.file? 'CMakeLists.txt'
|
if File.file? 'CMakeLists.txt'
|
||||||
puts "-DCMAKE_INSTALL_PREFIX=#{prefix}"
|
puts "-DCMAKE_INSTALL_PREFIX=#{prefix}"
|
||||||
|
|||||||
@ -6,14 +6,14 @@ module Homebrew extend self
|
|||||||
# EDITOR isn't a good fit here, we need a GUI client that actually has
|
# EDITOR isn't a good fit here, we need a GUI client that actually has
|
||||||
# a UI for projects, so apologies if this wasn't what you expected,
|
# a UI for projects, so apologies if this wasn't what you expected,
|
||||||
# please improve it! :)
|
# please improve it! :)
|
||||||
exec 'mate', HOMEBREW_REPOSITORY/"bin/brew",
|
exec 'mate', HOMEBREW_REPOSITORY+"bin/brew",
|
||||||
HOMEBREW_REPOSITORY/'README.md',
|
HOMEBREW_REPOSITORY+'README.md',
|
||||||
HOMEBREW_REPOSITORY/".gitignore",
|
HOMEBREW_REPOSITORY+".gitignore",
|
||||||
*Dir[HOMEBREW_REPOSITORY/"Library/*"]
|
*Dir[HOMEBREW_REPOSITORY+"Library/*"]
|
||||||
else
|
else
|
||||||
# Don't use ARGV.formulae as that will throw if the file doesn't parse
|
# Don't use ARGV.formulae as that will throw if the file doesn't parse
|
||||||
paths = ARGV.named.map do |name|
|
paths = ARGV.named.map do |name|
|
||||||
HOMEBREW_REPOSITORY/"Library/Formula/#{Formula.caniconical_name name}.rb"
|
HOMEBREW_REPOSITORY+"Library/Formula/#{Formula.caniconical_name name}.rb"
|
||||||
end
|
end
|
||||||
unless ARGV.force?
|
unless ARGV.force?
|
||||||
paths.each do |path|
|
paths.each do |path|
|
||||||
|
|||||||
@ -74,7 +74,7 @@ module Homebrew extend self
|
|||||||
|
|
||||||
rescue FormulaUnavailableError
|
rescue FormulaUnavailableError
|
||||||
# check for DIY installation
|
# check for DIY installation
|
||||||
d = HOMEBREW_PREFIX/name
|
d = HOMEBREW_PREFIX+name
|
||||||
if d.directory?
|
if d.directory?
|
||||||
ohai "DIY Installation"
|
ohai "DIY Installation"
|
||||||
d.children.each{ |keg| puts "#{keg} (#{keg.abv})" }
|
d.children.each{ |keg| puts "#{keg} (#{keg.abv})" }
|
||||||
|
|||||||
@ -9,7 +9,7 @@ module Homebrew extend self
|
|||||||
if ARGV.named.empty?
|
if ARGV.named.empty?
|
||||||
HOMEBREW_CELLAR.children.select{ |pn| pn.directory? }
|
HOMEBREW_CELLAR.children.select{ |pn| pn.directory? }
|
||||||
else
|
else
|
||||||
ARGV.named.map{ |n| HOMEBREW_CELLAR/n }.select{ |pn| pn.exist? }
|
ARGV.named.map{ |n| HOMEBREW_CELLAR+n }.select{ |pn| pn.exist? }
|
||||||
end.each do |d|
|
end.each do |d|
|
||||||
versions = d.children.select{ |pn| pn.directory? }.map{ |pn| pn.basename.to_s }
|
versions = d.children.select{ |pn| pn.directory? }.map{ |pn| pn.basename.to_s }
|
||||||
puts "#{d.basename} #{versions*' '}"
|
puts "#{d.basename} #{versions*' '}"
|
||||||
|
|||||||
@ -7,7 +7,7 @@ module Homebrew extend self
|
|||||||
$d = 0
|
$d = 0
|
||||||
dirs = []
|
dirs = []
|
||||||
|
|
||||||
%w[bin sbin etc lib include share].map{ |d| HOMEBREW_PREFIX/d }.each do |path|
|
%w[bin sbin etc lib include share].map{ |d| HOMEBREW_PREFIX+d }.each do |path|
|
||||||
path.find do |path|
|
path.find do |path|
|
||||||
path.extend ObserverPathnameExtension
|
path.extend ObserverPathnameExtension
|
||||||
if path.symlink?
|
if path.symlink?
|
||||||
|
|||||||
@ -39,7 +39,7 @@ module Homebrew extend self
|
|||||||
# Filter out aliases when the full name was also found
|
# Filter out aliases when the full name was also found
|
||||||
results.reject do |alias_name|
|
results.reject do |alias_name|
|
||||||
if aliases.include? alias_name
|
if aliases.include? alias_name
|
||||||
resolved_name = (HOMEBREW_REPOSITORY/"Library/Aliases"/alias_name).readlink.basename('.rb').to_s
|
resolved_name = (HOMEBREW_REPOSITORY+"Library/Aliases"+alias_name).readlink.basename('.rb').to_s
|
||||||
results.include? resolved_name
|
results.include? resolved_name
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
@ -54,7 +54,7 @@ class Formula
|
|||||||
# Don't resolve paths or URLs
|
# Don't resolve paths or URLs
|
||||||
return name if name.include?("/")
|
return name if name.include?("/")
|
||||||
|
|
||||||
aka = HOMEBREW_REPOSITORY/:Library/:Aliases/name
|
aka = HOMEBREW_REPOSITORY+"Library/Aliases"+name
|
||||||
if aka.file?
|
if aka.file?
|
||||||
aka.realpath.basename('.rb').to_s
|
aka.realpath.basename('.rb').to_s
|
||||||
else
|
else
|
||||||
|
|||||||
@ -18,7 +18,7 @@ module HomebrewArgvExtension
|
|||||||
require 'keg'
|
require 'keg'
|
||||||
require 'formula'
|
require 'formula'
|
||||||
@kegs ||= downcased_unique_named.collect do |name|
|
@kegs ||= downcased_unique_named.collect do |name|
|
||||||
d = HOMEBREW_CELLAR/Formula.caniconical_name(name)
|
d = HOMEBREW_CELLAR+Formula.caniconical_name(name)
|
||||||
dirs = d.children.select{ |pn| pn.directory? } rescue []
|
dirs = d.children.select{ |pn| pn.directory? } rescue []
|
||||||
raise NoSuchKegError.new(name) if not d.directory? or dirs.length == 0
|
raise NoSuchKegError.new(name) if not d.directory? or dirs.length == 0
|
||||||
raise MultipleVersionsInstalledError.new(name) if dirs.length > 1
|
raise MultipleVersionsInstalledError.new(name) if dirs.length > 1
|
||||||
|
|||||||
@ -299,8 +299,8 @@ class Formula
|
|||||||
end
|
end
|
||||||
|
|
||||||
def self.caniconical_name name
|
def self.caniconical_name name
|
||||||
formula_with_that_name = HOMEBREW_REPOSITORY/"Library/Formula/#{name}.rb"
|
formula_with_that_name = HOMEBREW_REPOSITORY+"Library/Formula/#{name}.rb"
|
||||||
possible_alias = HOMEBREW_REPOSITORY/"Library/Aliases"/name
|
possible_alias = HOMEBREW_REPOSITORY+"Library/Aliases"+name
|
||||||
if name.include? "/"
|
if name.include? "/"
|
||||||
# Don't resolve paths or URLs
|
# Don't resolve paths or URLs
|
||||||
name
|
name
|
||||||
@ -365,7 +365,7 @@ class Formula
|
|||||||
end
|
end
|
||||||
|
|
||||||
def self.path name
|
def self.path name
|
||||||
HOMEBREW_REPOSITORY/"Library/Formula/#{name.downcase}.rb"
|
HOMEBREW_REPOSITORY+"Library/Formula/#{name.downcase}.rb"
|
||||||
end
|
end
|
||||||
|
|
||||||
def deps
|
def deps
|
||||||
|
|||||||
@ -27,10 +27,10 @@ HOMEBREW_REPOSITORY = Pathname.new(HOMEBREW_BREW_FILE).realpath.dirname.parent #
|
|||||||
|
|
||||||
# Where we store built products; /usr/local/Cellar if it exists,
|
# Where we store built products; /usr/local/Cellar if it exists,
|
||||||
# otherwise a Cellar relative to the Repository.
|
# otherwise a Cellar relative to the Repository.
|
||||||
HOMEBREW_CELLAR = if (HOMEBREW_PREFIX/"Cellar").exist?
|
HOMEBREW_CELLAR = if (HOMEBREW_PREFIX+"Cellar").exist?
|
||||||
HOMEBREW_PREFIX/"Cellar"
|
HOMEBREW_PREFIX+"Cellar"
|
||||||
else
|
else
|
||||||
HOMEBREW_REPOSITORY/"Cellar"
|
HOMEBREW_REPOSITORY+"Cellar"
|
||||||
end
|
end
|
||||||
|
|
||||||
MACOS_FULL_VERSION = `/usr/bin/sw_vers -productVersion`.chomp
|
MACOS_FULL_VERSION = `/usr/bin/sw_vers -productVersion`.chomp
|
||||||
|
|||||||
@ -167,7 +167,7 @@ def install f
|
|||||||
end
|
end
|
||||||
|
|
||||||
# Check for man pages that aren't in share/man
|
# Check for man pages that aren't in share/man
|
||||||
if (f.prefix/:man).exist?
|
if (f.prefix+'man').exist?
|
||||||
opoo 'A top-level "man" folder was found.'
|
opoo 'A top-level "man" folder was found.'
|
||||||
puts "Homebrew requires that man pages live under share."
|
puts "Homebrew requires that man pages live under share."
|
||||||
puts 'This can often be fixed by passing "--mandir=#{man}" to configure.'
|
puts 'This can often be fixed by passing "--mandir=#{man}" to configure.'
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user