aboutsummaryrefslogtreecommitdiffstats
path: root/Library
diff options
context:
space:
mode:
authorAdam Vandenberg2010-08-21 11:45:08 -0700
committerAdam Vandenberg2010-08-21 11:45:08 -0700
commit50bcbf62716b167afdb7124f3982b52d421cda33 (patch)
tree0f91f678e9bbb644e4febdecd072483e1d3fc9ba /Library
parentb8a9154fc6e09b92f1e9a856f7d13464e4d43c6a (diff)
downloadhomebrew-50bcbf62716b167afdb7124f3982b52d421cda33.tar.bz2
Deal with symlinked meta files
Diffstat (limited to 'Library')
-rwxr-xr-xLibrary/Homebrew/install.rb11
1 files changed, 7 insertions, 4 deletions
diff --git a/Library/Homebrew/install.rb b/Library/Homebrew/install.rb
index 722accb52..72a2f1682 100755
--- a/Library/Homebrew/install.rb
+++ b/Library/Homebrew/install.rb
@@ -94,10 +94,13 @@ def install f
f.prefix.mkpath
beginning=Time.now
f.install
- FORMULA_META_FILES.each do |file|
- next if File.directory? file
- FileUtils.mv "#{file}.txt", file rescue nil
- f.prefix.install file rescue nil
+ FORMULA_META_FILES.each do |filename|
+ next if File.directory? filename
+ target_file = filename
+ target_file = "#{filename}.txt" if File.exists? "#{filename}.txt"
+ # Some software symlinks these files (see help2man.rb)
+ target_file = Pathname.new(target_file).resolved_path
+ f.prefix.install target_file => filename rescue nil
(f.prefix+file).chmod 0644 rescue nil
end
build_time = Time.now-beginning