Skip to content

Commit

Permalink
cmd/man: deprecate --link option.
Browse files Browse the repository at this point in the history
  • Loading branch information
MikeMcQuaid committed Aug 24, 2016
1 parent 3df7daa commit ec75fbc
Showing 1 changed file with 1 addition and 13 deletions.
14 changes: 1 addition & 13 deletions Library/Homebrew/cmd/man.rb
Expand Up @@ -11,26 +11,14 @@ def man
raise UsageError unless ARGV.named.empty?

if ARGV.flag? "--link"
link_man_pages
odie "`brew man --link` is now done automatically by `brew update`."
else
regenerate_man_pages
end
end

private

def link_man_pages
linked_path = HOMEBREW_PREFIX/"share/man/man1"

if TARGET_MAN_PATH == linked_path
odie "The target path is the same as the linked one."
end

Dir["#{TARGET_MAN_PATH}/*.1"].each do |page|
FileUtils.ln_s page, linked_path
end
end

def regenerate_man_pages
Homebrew.install_gem_setup_path! "ronn"

Expand Down

0 comments on commit ec75fbc

Please sign in to comment.