tap: use utils link_path_manpages.
This commit is contained in:
parent
8cc027a3cd
commit
03352805c6
@ -248,26 +248,7 @@ class Tap
|
|||||||
end
|
end
|
||||||
|
|
||||||
def link_manpages
|
def link_manpages
|
||||||
return unless (path/"man").exist?
|
link_path_manpages(path, "brew tap --repair")
|
||||||
conflicts = []
|
|
||||||
(path/"man").find do |src|
|
|
||||||
next if src.directory?
|
|
||||||
dst = HOMEBREW_PREFIX/"share"/src.relative_path_from(path)
|
|
||||||
next if dst.symlink? && src == dst.resolved_path
|
|
||||||
if dst.exist?
|
|
||||||
conflicts << dst
|
|
||||||
next
|
|
||||||
end
|
|
||||||
dst.make_relative_symlink(src)
|
|
||||||
end
|
|
||||||
unless conflicts.empty?
|
|
||||||
onoe <<-EOS.undent
|
|
||||||
Could not link #{name} manpages to:
|
|
||||||
#{conflicts.join("\n")}
|
|
||||||
|
|
||||||
Please delete these files and run `brew tap --repair`.
|
|
||||||
EOS
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
|
|
||||||
# uninstall this {Tap}.
|
# uninstall this {Tap}.
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user