aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew/cmd
diff options
context:
space:
mode:
authorMike McQuaid2016-08-24 14:41:35 +0100
committerGitHub2016-08-24 14:41:35 +0100
commitacfb1b1979fcee68c334c0abf7a7747b958e7d77 (patch)
tree15eb79c70a7c987052e5d796ac6f94982bc9fe4e /Library/Homebrew/cmd
parentfa19447a2d9d311909452ee35b309d08558c9a3a (diff)
parentec75fbcb65ac151f401ec3fb483a1a1acf63d5e4 (diff)
downloadbrew-acfb1b1979fcee68c334c0abf7a7747b958e7d77.tar.bz2
Merge pull request #783 from MikeMcQuaid/update-link-manpages
update-report: also link `brew*.1` manpages.
Diffstat (limited to 'Library/Homebrew/cmd')
-rw-r--r--Library/Homebrew/cmd/man.rb14
-rw-r--r--Library/Homebrew/cmd/update-report.rb6
2 files changed, 7 insertions, 13 deletions
diff --git a/Library/Homebrew/cmd/man.rb b/Library/Homebrew/cmd/man.rb
index 0191d76c7..c873e7568 100644
--- a/Library/Homebrew/cmd/man.rb
+++ b/Library/Homebrew/cmd/man.rb
@@ -11,7 +11,7 @@ module Homebrew
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
@@ -19,18 +19,6 @@ module Homebrew
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"
diff --git a/Library/Homebrew/cmd/update-report.rb b/Library/Homebrew/cmd/update-report.rb
index 9b648a538..5121bdb6c 100644
--- a/Library/Homebrew/cmd/update-report.rb
+++ b/Library/Homebrew/cmd/update-report.rb
@@ -85,6 +85,7 @@ module Homebrew
Descriptions.update_cache(hub)
end
+ link_manpages
Tap.each(&:link_manpages)
Homebrew.failed = true if ENV["HOMEBREW_UPDATE_FAILED"]
@@ -158,6 +159,11 @@ module Homebrew
end
end
end
+
+ def link_manpages
+ return if HOMEBREW_PREFIX.to_s == HOMEBREW_REPOSITORY.to_s
+ link_path_manpages(HOMEBREW_REPOSITORY/"share", "brew update")
+ end
end
class Reporter