aboutsummaryrefslogtreecommitdiffstats
path: root/Library
diff options
context:
space:
mode:
authorJack Nagel2014-07-28 21:22:33 -0500
committerJack Nagel2014-07-28 21:25:49 -0500
commit8a971f72686298ba44d427ba65823a6e70b2a4d8 (patch)
tree5c3b72331ef848a0b94806385f1284719698a8f7 /Library
parent8df8f437f0ed107dd98e9ef71db0768d8dc58121 (diff)
downloadbrew-8a971f72686298ba44d427ba65823a6e70b2a4d8.tar.bz2
Move the fixopt method into the Build class
Diffstat (limited to 'Library')
-rw-r--r--Library/Homebrew/build.rb26
1 files changed, 13 insertions, 13 deletions
diff --git a/Library/Homebrew/build.rb b/Library/Homebrew/build.rb
index 3ec01a985..c92ef1c81 100644
--- a/Library/Homebrew/build.rb
+++ b/Library/Homebrew/build.rb
@@ -208,19 +208,19 @@ class Build
end
end
end
-end
-def fixopt f
- path = if f.linked_keg.directory? and f.linked_keg.symlink?
- f.linked_keg.resolved_path
- elsif f.prefix.directory?
- f.prefix
- elsif (kids = f.rack.children).size == 1 and kids.first.directory?
- kids.first
- else
- raise
+ def fixopt f
+ path = if f.linked_keg.directory? and f.linked_keg.symlink?
+ f.linked_keg.resolved_path
+ elsif f.prefix.directory?
+ f.prefix
+ elsif (kids = f.rack.children).size == 1 and kids.first.directory?
+ kids.first
+ else
+ raise
+ end
+ Keg.new(path).optlink
+ rescue StandardError
+ raise "#{f.opt_prefix} not present or broken\nPlease reinstall #{f}. Sorry :("
end
- Keg.new(path).optlink
-rescue StandardError
- raise "#{f.opt_prefix} not present or broken\nPlease reinstall #{f}. Sorry :("
end