Move the fixopt method into the Build class
This commit is contained in:
parent
8df8f437f0
commit
8a971f7268
@ -208,19 +208,19 @@ class Build
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
|
||||||
|
|
||||||
def fixopt f
|
def fixopt f
|
||||||
path = if f.linked_keg.directory? and f.linked_keg.symlink?
|
path = if f.linked_keg.directory? and f.linked_keg.symlink?
|
||||||
f.linked_keg.resolved_path
|
f.linked_keg.resolved_path
|
||||||
elsif f.prefix.directory?
|
elsif f.prefix.directory?
|
||||||
f.prefix
|
f.prefix
|
||||||
elsif (kids = f.rack.children).size == 1 and kids.first.directory?
|
elsif (kids = f.rack.children).size == 1 and kids.first.directory?
|
||||||
kids.first
|
kids.first
|
||||||
else
|
else
|
||||||
raise
|
raise
|
||||||
|
end
|
||||||
|
Keg.new(path).optlink
|
||||||
|
rescue StandardError
|
||||||
|
raise "#{f.opt_prefix} not present or broken\nPlease reinstall #{f}. Sorry :("
|
||||||
end
|
end
|
||||||
Keg.new(path).optlink
|
|
||||||
rescue StandardError
|
|
||||||
raise "#{f.opt_prefix} not present or broken\nPlease reinstall #{f}. Sorry :("
|
|
||||||
end
|
end
|
||||||
|
Loading…
x
Reference in New Issue
Block a user