aboutsummaryrefslogtreecommitdiffstats
path: root/Library
diff options
context:
space:
mode:
Diffstat (limited to 'Library')
-rw-r--r--Library/Homebrew/keg_fix_install_names.rb10
1 files changed, 7 insertions, 3 deletions
diff --git a/Library/Homebrew/keg_fix_install_names.rb b/Library/Homebrew/keg_fix_install_names.rb
index 3900e774b..3d1300181 100644
--- a/Library/Homebrew/keg_fix_install_names.rb
+++ b/Library/Homebrew/keg_fix_install_names.rb
@@ -8,7 +8,7 @@ class Keg
bad_names.each do |bad_name|
new_name = fixed_name(file, bad_name)
unless new_name == bad_name
- install_name_tool("-change", bad_name, new_name, file)
+ change_install_name(bad_name, new_name, file)
end
end
end
@@ -25,7 +25,7 @@ class Keg
old_prefix_names.each do |old_prefix_name|
new_prefix_name = old_prefix_name.to_s.gsub old_prefix, new_prefix
- install_name_tool("-change", old_prefix_name, new_prefix_name, file)
+ change_install_name(old_prefix_name, new_prefix_name, file)
end
end
end
@@ -34,7 +34,7 @@ class Keg
file.ensure_writable do
old_cellar_names.each do |old_cellar_name|
new_cellar_name = old_cellar_name.to_s.gsub old_cellar, new_cellar
- install_name_tool("-change", old_cellar_name, new_cellar_name, file)
+ change_install_name(old_cellar_name, new_cellar_name, file)
end
end
end
@@ -56,6 +56,10 @@ class Keg
end
end
+ def change_install_name(old, new, file)
+ install_name_tool("-change", old, new, file)
+ end
+
# Given old == "/usr/local/Cellar" and new == "/opt/homebrew/Cellar",
# then update lines of the form
# some_variable=/usr/local/Cellar/foo/1.0/lib