diff options
| author | Joshua McKinney | 2016-09-30 18:22:53 -0500 | 
|---|---|---|
| committer | Joshua McKinney | 2017-02-26 15:40:52 -0600 | 
| commit | 25396d9c4d7a7a111eebf02f0ebdbb0e69aad3b0 (patch) | |
| tree | f91be666cdc54f1a69f418a7a54068509105dd23 /Library/Homebrew/utils.rb | |
| parent | a74b7ade66e340c55b3bea7b6226fa68a311b4ce (diff) | |
| download | brew-25396d9c4d7a7a111eebf02f0ebdbb0e69aad3b0.tar.bz2 | |
Install tap command completions and manpages
Taps can include completion scripts for external commands under
`completions/bash`, `completions/fish`, or `completions/zsh`. `brew tap`
will automatically install these into the correct directories during
install.
Diffstat (limited to 'Library/Homebrew/utils.rb')
| -rw-r--r-- | Library/Homebrew/utils.rb | 33 | 
1 files changed, 1 insertions, 32 deletions
diff --git a/Library/Homebrew/utils.rb b/Library/Homebrew/utils.rb index 70d2787d9..ae1bffa87 100644 --- a/Library/Homebrew/utils.rb +++ b/Library/Homebrew/utils.rb @@ -9,6 +9,7 @@ require "utils/git"  require "utils/github"  require "utils/hash"  require "utils/inreplace" +require "utils/link"  require "utils/popen"  require "utils/tty"  require "time" @@ -481,38 +482,6 @@ def truncate_text_to_approximate_size(s, max_bytes, options = {})    out  end -def link_src_dst_dirs(src_dir, dst_dir, command, link_dir: false) -  return unless src_dir.exist? -  conflicts = [] -  src_paths = link_dir ? [src_dir] : src_dir.find -  src_paths.each do |src| -    next if src.directory? && !link_dir -    dst = dst_dir/src.relative_path_from(src_dir) -    if dst.symlink? -      next if src == dst.resolved_path -      dst.unlink -    end -    if dst.exist? -      conflicts << dst -      next -    end -    dst_dir.parent.mkpath -    dst.make_relative_symlink(src) -  end - -  return if conflicts.empty? -  onoe <<-EOS.undent -    Could not link: -    #{conflicts.join("\n")} - -    Please delete these paths and run `#{command}`. -  EOS -end - -def link_path_manpages(path, command) -  link_src_dst_dirs(path/"man", HOMEBREW_PREFIX/"share/man", command) -end -  def migrate_legacy_keg_symlinks_if_necessary    legacy_linked_kegs = HOMEBREW_LIBRARY/"LinkedKegs"    return unless legacy_linked_kegs.directory?  | 
