Spec-Zone.ru › Homebrew

Module: Utils::Link Private

Extended by:
Output::Mixin
Defined in:
utils/link.rb

Overview

This module is part of a private API. This module may only be used in the Homebrew/brew repository. Third parties should avoid using this module if possible, as it may be removed or changed without warning.

Helper functions for creating symlinks.

Class Method Summary collapse

  • .link_completions(path, command) ⇒ void private
  • .link_docs(path, command) ⇒ void private
  • .link_manpages(path, command) ⇒ void private
  • .unlink_completions(path) ⇒ void private
  • .unlink_manpages(path) ⇒ void private

Methods included from Output::Mixin

issue_reporting_message, odebug, odeprecated, odie, odisabled, ofail, oh1, oh1_title, ohai, ohai_title, onoe, opoo, opoo_outside_github_actions, opoo_without_github_actions_annotation, pretty_deprecated, pretty_disabled, pretty_duration, pretty_install_status, pretty_installed, pretty_uninstalled, pretty_upgradable, pretty_warning

Class Method Details

.link_completions(path, command) ⇒ void

This method is part of a private API. This method may only be used in the Homebrew/brew repository. Third parties should avoid using this method if possible, as it may be removed or changed without warning.

This method returns an undefined value.

Parameters:

  • path (Pathname)
  • command (String)


72
73
74
75
76
# File 'utils/link.rb', line 72

def self.link_completions(path, command)
  link_src_dst_dirs(path/"completions/bash", HOMEBREW_PREFIX/"etc/bash_completion.d", command)
  link_src_dst_dirs(path/"completions/zsh", HOMEBREW_PREFIX/"share/zsh/site-functions", command)
  link_src_dst_dirs(path/"completions/fish", HOMEBREW_PREFIX/"share/fish/vendor_completions.d", command)
end

.link_docs(path, command) ⇒ void

This method is part of a private API. This method may only be used in the Homebrew/brew repository. Third parties should avoid using this method if possible, as it may be removed or changed without warning.

This method returns an undefined value.

Parameters:

  • path (Pathname)
  • command (String)


86
87
88
# File 'utils/link.rb', line 86

def self.link_docs(path, command)
  link_src_dst_dirs(path/"docs", HOMEBREW_PREFIX/"share/doc/homebrew", command, link_dir: true)
end

.link_manpages(path, command) ⇒ void

This method is part of a private API. This method may only be used in the Homebrew/brew repository. Third parties should avoid using this method if possible, as it may be removed or changed without warning.

This method returns an undefined value.

Parameters:

  • path (Pathname)
  • command (String)


62
63
64
# File 'utils/link.rb', line 62

def self.link_manpages(path, command)
  link_src_dst_dirs(path/"manpages", HOMEBREW_PREFIX/"share/man/man1", command)
end

.unlink_completions(path) ⇒ void

This method is part of a private API. This method may only be used in the Homebrew/brew repository. Third parties should avoid using this method if possible, as it may be removed or changed without warning.

This method returns an undefined value.

Parameters:

  • path (Pathname)


79
80
81
82
83
# File 'utils/link.rb', line 79

def self.unlink_completions(path)
  unlink_src_dst_dirs(path/"completions/bash", HOMEBREW_PREFIX/"etc/bash_completion.d")
  unlink_src_dst_dirs(path/"completions/zsh", HOMEBREW_PREFIX/"share/zsh/site-functions")
  unlink_src_dst_dirs(path/"completions/fish", HOMEBREW_PREFIX/"share/fish/vendor_completions.d")
end

.unlink_manpages(path) ⇒ void

This method is part of a private API. This method may only be used in the Homebrew/brew repository. Third parties should avoid using this method if possible, as it may be removed or changed without warning.

This method returns an undefined value.

Parameters:

  • path (Pathname)


67
68
69
# File 'utils/link.rb', line 67

def self.unlink_manpages(path)
  unlink_src_dst_dirs(path/"manpages", HOMEBREW_PREFIX/"share/man/man1")
end

© 2009–present Homebrew contributors
Licensed under the BSD 2-Clause License.
https://docs.brew.sh/rubydoc/Utils/Link.html

Spec-Zone.ru

Настройки Оффлайн Что нового Помощь О нас
Spec-Zone .ru
спецификации, руководства, описания, API