(un)linkapps: hide from manpage, use odeprecated.
This commit is contained in:
		
							parent
							
								
									d14fd49b30
								
							
						
					
					
						commit
						b96ec879dc
					
				@ -1,3 +1,4 @@
 | 
			
		||||
#: @hide_from_man_page
 | 
			
		||||
#:  * `linkapps` [`--local`] [<formulae>]:
 | 
			
		||||
#:    Find installed formulae that provide `.app`-style macOS apps and symlink them
 | 
			
		||||
#:    into `/Applications`, allowing for easier access (deprecated).
 | 
			
		||||
@ -6,11 +7,6 @@
 | 
			
		||||
#:    either aliases or symlinks and Homebrew formulae do not build "proper" `.app`
 | 
			
		||||
#:    bundles that can be relocated. Instead, please consider using `brew cask` and
 | 
			
		||||
#:    migrate formulae using `.app`s to casks.
 | 
			
		||||
#:
 | 
			
		||||
#:    If no <formulae> are provided, all of them will have their apps symlinked.
 | 
			
		||||
#:
 | 
			
		||||
#:    If provided, `--local` will symlink them into the user's `~/Applications`
 | 
			
		||||
#:    directory instead of the system directory.
 | 
			
		||||
 | 
			
		||||
require "keg"
 | 
			
		||||
require "formula"
 | 
			
		||||
@ -19,14 +15,7 @@ module Homebrew
 | 
			
		||||
  module_function
 | 
			
		||||
 | 
			
		||||
  def linkapps
 | 
			
		||||
    opoo <<~EOS
 | 
			
		||||
      `brew linkapps` has been deprecated and will eventually be removed!
 | 
			
		||||
 | 
			
		||||
      Unfortunately `brew linkapps` cannot behave nicely with e.g. Spotlight using
 | 
			
		||||
      either aliases or symlinks and Homebrew formulae do not build "proper" `.app`
 | 
			
		||||
      bundles that can be relocated. Instead, please consider using `brew cask` and
 | 
			
		||||
      migrate formulae using `.app`s to casks.
 | 
			
		||||
    EOS
 | 
			
		||||
    odeprecated "'brew linkapps'"
 | 
			
		||||
 | 
			
		||||
    target_dir = linkapps_target(local: ARGV.include?("--local"))
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
@ -1,3 +1,4 @@
 | 
			
		||||
#: @hide_from_man_page
 | 
			
		||||
#:  * `unlinkapps` [`--local`] [`--dry-run`] [<formulae>]:
 | 
			
		||||
#:    Remove symlinks created by `brew linkapps` from `/Applications` (deprecated).
 | 
			
		||||
#:
 | 
			
		||||
@ -5,14 +6,6 @@
 | 
			
		||||
#:    either aliases or symlinks and Homebrew formulae do not build "proper" `.app`
 | 
			
		||||
#:    bundles that can be relocated. Instead, please consider using `brew cask` and
 | 
			
		||||
#:    migrate formulae using `.app`s to casks.
 | 
			
		||||
#:
 | 
			
		||||
#:    If no <formulae> are provided, all linked apps will be removed.
 | 
			
		||||
#:
 | 
			
		||||
#:    If provided, `--local` will remove symlinks from the user's `~/Applications`
 | 
			
		||||
#:    directory instead of the system directory.
 | 
			
		||||
#:
 | 
			
		||||
#:    If `--dry-run` or `-n` is passed, Homebrew will list all symlinks which
 | 
			
		||||
#:    would be removed, but will not actually delete any files.
 | 
			
		||||
 | 
			
		||||
require "cmd/linkapps"
 | 
			
		||||
 | 
			
		||||
@ -20,11 +13,7 @@ module Homebrew
 | 
			
		||||
  module_function
 | 
			
		||||
 | 
			
		||||
  def unlinkapps
 | 
			
		||||
    opoo <<~EOS
 | 
			
		||||
      `brew unlinkapps` has been deprecated and will eventually be removed!
 | 
			
		||||
 | 
			
		||||
      Unfortunately `brew linkapps` cannot behave nicely with e.g. Spotlight using either aliases or symlinks and Homebrew formulae do not build "proper" `.app` bundles that can be relocated. Instead, please consider using `brew cask` and migrate formulae using `.app`s to casks.
 | 
			
		||||
    EOS
 | 
			
		||||
    odeprecated "'brew unlinkapps'"
 | 
			
		||||
 | 
			
		||||
    target_dir = linkapps_target(local: ARGV.include?("--local"))
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
@ -10,9 +10,11 @@ describe "brew linkapps", :integration_test do
 | 
			
		||||
    source_app = HOMEBREW_CELLAR/"testball/0.1/TestBall.app"
 | 
			
		||||
    source_app.mkpath
 | 
			
		||||
 | 
			
		||||
    ENV.delete "HOMEBREW_DEVELOPER"
 | 
			
		||||
 | 
			
		||||
    expect { brew "linkapps", "--local", "HOME" => home_dir }
 | 
			
		||||
      .to output(/Linking: #{Regexp.escape(source_app)}/).to_stdout
 | 
			
		||||
      .and output(/`brew linkapps` has been deprecated/).to_stderr
 | 
			
		||||
      .and output(/'brew linkapps' is deprecated/).to_stderr
 | 
			
		||||
      .and be_a_success
 | 
			
		||||
 | 
			
		||||
    expect(apps_dir/"TestBall.app").to be_a_symlink
 | 
			
		||||
 | 
			
		||||
@ -12,9 +12,11 @@ describe "brew unlinkapps", :integration_test do
 | 
			
		||||
 | 
			
		||||
    FileUtils.ln_s source_app, apps_dir/"TestBall.app"
 | 
			
		||||
 | 
			
		||||
    ENV.delete "HOMEBREW_DEVELOPER"
 | 
			
		||||
 | 
			
		||||
    expect { brew "unlinkapps", "--local", "HOME" => home_dir }
 | 
			
		||||
      .to output(%r{Unlinking: #{Regexp.escape(apps_dir)}/TestBall.app}).to_stdout
 | 
			
		||||
      .and output(/`brew unlinkapps` has been deprecated/).to_stderr
 | 
			
		||||
      .and output(/'brew unlinkapps' is deprecated/).to_stderr
 | 
			
		||||
      .and be_a_success
 | 
			
		||||
  end
 | 
			
		||||
end
 | 
			
		||||
 | 
			
		||||
@ -291,20 +291,6 @@ With `--verbose` or `-v`, many commands print extra debugging information. Note
 | 
			
		||||
 | 
			
		||||
    If `--force` (or `-f`) is passed, Homebrew will allow keg-only formulae to be linked.
 | 
			
		||||
 | 
			
		||||
  * `linkapps` [`--local`] [`formulae`]:
 | 
			
		||||
    Find installed formulae that provide `.app`-style macOS apps and symlink them
 | 
			
		||||
    into `/Applications`, allowing for easier access (deprecated).
 | 
			
		||||
 | 
			
		||||
    Unfortunately `brew linkapps` cannot behave nicely with e.g. Spotlight using
 | 
			
		||||
    either aliases or symlinks and Homebrew formulae do not build "proper" `.app`
 | 
			
		||||
    bundles that can be relocated. Instead, please consider using `brew cask` and
 | 
			
		||||
    migrate formulae using `.app`s to casks.
 | 
			
		||||
 | 
			
		||||
    If no `formulae` are provided, all of them will have their apps symlinked.
 | 
			
		||||
 | 
			
		||||
    If provided, `--local` will symlink them into the user's `~/Applications`
 | 
			
		||||
    directory instead of the system directory.
 | 
			
		||||
 | 
			
		||||
  * `list`, `ls` [`--full-name`]:
 | 
			
		||||
    List all installed formulae. If `--full-name` is passed, print formulae
 | 
			
		||||
    with fully-qualified names. If `--full-name` is not passed, any other
 | 
			
		||||
@ -519,22 +505,6 @@ With `--verbose` or `-v`, many commands print extra debugging information. Note
 | 
			
		||||
    If `--dry-run` or `-n` is passed, Homebrew will list all files which would
 | 
			
		||||
    be unlinked, but will not actually unlink or delete any files.
 | 
			
		||||
 | 
			
		||||
  * `unlinkapps` [`--local`] [`--dry-run`] [`formulae`]:
 | 
			
		||||
    Remove symlinks created by `brew linkapps` from `/Applications` (deprecated).
 | 
			
		||||
 | 
			
		||||
    Unfortunately `brew linkapps` cannot behave nicely with e.g. Spotlight using
 | 
			
		||||
    either aliases or symlinks and Homebrew formulae do not build "proper" `.app`
 | 
			
		||||
    bundles that can be relocated. Instead, please consider using `brew cask` and
 | 
			
		||||
    migrate formulae using `.app`s to casks.
 | 
			
		||||
 | 
			
		||||
    If no `formulae` are provided, all linked apps will be removed.
 | 
			
		||||
 | 
			
		||||
    If provided, `--local` will remove symlinks from the user's `~/Applications`
 | 
			
		||||
    directory instead of the system directory.
 | 
			
		||||
 | 
			
		||||
    If `--dry-run` or `-n` is passed, Homebrew will list all symlinks which
 | 
			
		||||
    would be removed, but will not actually delete any files.
 | 
			
		||||
 | 
			
		||||
  * `unpack` [`--git`|`--patch`] [`--destdir=``path`] `formulae`:
 | 
			
		||||
    Unpack the source files for `formulae` into subdirectories of the current
 | 
			
		||||
    working directory. If `--destdir=``path` is given, the subdirectories will
 | 
			
		||||
 | 
			
		||||
@ -302,19 +302,6 @@ If \fB\-\-dry\-run\fR or \fB\-n\fR is passed, Homebrew will list all files which
 | 
			
		||||
If \fB\-\-force\fR (or \fB\-f\fR) is passed, Homebrew will allow keg\-only formulae to be linked\.
 | 
			
		||||
.
 | 
			
		||||
.TP
 | 
			
		||||
\fBlinkapps\fR [\fB\-\-local\fR] [\fIformulae\fR]
 | 
			
		||||
Find installed formulae that provide \fB\.app\fR\-style macOS apps and symlink them into \fB/Applications\fR, allowing for easier access (deprecated)\.
 | 
			
		||||
.
 | 
			
		||||
.IP
 | 
			
		||||
Unfortunately \fBbrew linkapps\fR cannot behave nicely with e\.g\. Spotlight using either aliases or symlinks and Homebrew formulae do not build "proper" \fB\.app\fR bundles that can be relocated\. Instead, please consider using \fBbrew cask\fR and migrate formulae using \fB\.app\fRs to casks\.
 | 
			
		||||
.
 | 
			
		||||
.IP
 | 
			
		||||
If no \fIformulae\fR are provided, all of them will have their apps symlinked\.
 | 
			
		||||
.
 | 
			
		||||
.IP
 | 
			
		||||
If provided, \fB\-\-local\fR will symlink them into the user\'s \fB~/Applications\fR directory instead of the system directory\.
 | 
			
		||||
.
 | 
			
		||||
.TP
 | 
			
		||||
\fBlist\fR, \fBls\fR [\fB\-\-full\-name\fR]
 | 
			
		||||
List all installed formulae\. If \fB\-\-full\-name\fR is passed, print formulae with fully\-qualified names\. If \fB\-\-full\-name\fR is not passed, any other options (e\.g\. \fB\-t\fR) are passed to \fBls\fR which produces the actual output\.
 | 
			
		||||
.
 | 
			
		||||
@ -535,22 +522,6 @@ Remove symlinks for \fIformula\fR from the Homebrew prefix\. This can be useful
 | 
			
		||||
If \fB\-\-dry\-run\fR or \fB\-n\fR is passed, Homebrew will list all files which would be unlinked, but will not actually unlink or delete any files\.
 | 
			
		||||
.
 | 
			
		||||
.TP
 | 
			
		||||
\fBunlinkapps\fR [\fB\-\-local\fR] [\fB\-\-dry\-run\fR] [\fIformulae\fR]
 | 
			
		||||
Remove symlinks created by \fBbrew linkapps\fR from \fB/Applications\fR (deprecated)\.
 | 
			
		||||
.
 | 
			
		||||
.IP
 | 
			
		||||
Unfortunately \fBbrew linkapps\fR cannot behave nicely with e\.g\. Spotlight using either aliases or symlinks and Homebrew formulae do not build "proper" \fB\.app\fR bundles that can be relocated\. Instead, please consider using \fBbrew cask\fR and migrate formulae using \fB\.app\fRs to casks\.
 | 
			
		||||
.
 | 
			
		||||
.IP
 | 
			
		||||
If no \fIformulae\fR are provided, all linked apps will be removed\.
 | 
			
		||||
.
 | 
			
		||||
.IP
 | 
			
		||||
If provided, \fB\-\-local\fR will remove symlinks from the user\'s \fB~/Applications\fR directory instead of the system directory\.
 | 
			
		||||
.
 | 
			
		||||
.IP
 | 
			
		||||
If \fB\-\-dry\-run\fR or \fB\-n\fR is passed, Homebrew will list all symlinks which would be removed, but will not actually delete any files\.
 | 
			
		||||
.
 | 
			
		||||
.TP
 | 
			
		||||
\fBunpack\fR [\fB\-\-git\fR|\fB\-\-patch\fR] [\fB\-\-destdir=\fR\fIpath\fR] \fIformulae\fR
 | 
			
		||||
Unpack the source files for \fIformulae\fR into subdirectories of the current working directory\. If \fB\-\-destdir=\fR\fIpath\fR is given, the subdirectories will be created in the directory named by \fIpath\fR instead\.
 | 
			
		||||
.
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user