last changes of 'brew --prefix' into 'brew --repository'

This commit is contained in:
Vítor Galvão
2015-10-27 23:56:51 +00:00
parent c2f77ddcdf
commit a6d00697fd
3 changed files with 5 additions and 5 deletions
+1 -1
View File
@@ -99,7 +99,7 @@ find_ruby_2_plus () {
else
IFS=$'\n' rubies=( $(/usr/bin/type -aP ruby) \
"/usr/local/bin/ruby" \
"$(brew --prefix 2>/dev/null)/bin/ruby" )
"$(brew --repository 2>/dev/null)/bin/ruby" )
for ruby in "${rubies[@]}"; do
version_str="$("$ruby" --version 2>/dev/null)"
if [[ "$version_str" =~ ^ruby.2 ]]; then
+1 -1
View File
@@ -23,7 +23,7 @@ class Ruby20Requirement < Requirement
rubies = `/usr/bin/type -aP ruby`.split("\n")
rubies += [
"/usr/local/bin/ruby",
"#{`brew --prefix 2>/dev/null`.strip}/bin/ruby",
"#{`brew --repository 2>/dev/null`.strip}/bin/ruby",
]
rubies.uniq.each do |ruby|
+3 -3
View File
@@ -120,10 +120,10 @@ _main () {
# initialization
cd_to_project_root
local git_root="$(/bin/pwd)"
local brew_prefix="$(brew --prefix)"
local cellar_dir="$brew_prefix/Cellar/brew-cask"
local brew_repository="$(brew --repository)"
local cellar_dir="$brew_repository/Cellar/brew-cask"
local version_dir="$(/bin/ls -- "$cellar_dir/" | /usr/bin/sort | /usr/bin/tail -1)"
local tap_dir="$brew_prefix/$tap_subdir"
local tap_dir="$brew_repository/$tap_subdir"
# sanity check
not_inside_homebrew "$tap_dir" "$git_root"