aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMike McQuaid2018-01-20 12:04:09 +0000
committerMike McQuaid2018-01-21 13:38:44 +0000
commitb96ec879dc405254718c7efd7ad0f966b0b80be9 (patch)
treef024d3a57dfd06893b309dbe5083452c6c7c119c
parentd14fd49b3062ab1d95e86b78a8228c8aee3a3304 (diff)
downloadbrew-b96ec879dc405254718c7efd7ad0f966b0b80be9.tar.bz2
(un)linkapps: hide from manpage, use odeprecated.
-rw-r--r--Library/Homebrew/cmd/linkapps.rb15
-rw-r--r--Library/Homebrew/cmd/unlinkapps.rb15
-rw-r--r--Library/Homebrew/test/cmd/linkapps_spec.rb4
-rw-r--r--Library/Homebrew/test/cmd/unlinkapps_spec.rb4
-rw-r--r--docs/Manpage.md30
-rw-r--r--manpages/brew.129
6 files changed, 10 insertions, 87 deletions
diff --git a/Library/Homebrew/cmd/linkapps.rb b/Library/Homebrew/cmd/linkapps.rb
index e8d482529..1bec67a04 100644
--- a/Library/Homebrew/cmd/linkapps.rb
+++ b/Library/Homebrew/cmd/linkapps.rb
@@ -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"))
diff --git a/Library/Homebrew/cmd/unlinkapps.rb b/Library/Homebrew/cmd/unlinkapps.rb
index 7f401aaeb..721e4d639 100644
--- a/Library/Homebrew/cmd/unlinkapps.rb
+++ b/Library/Homebrew/cmd/unlinkapps.rb
@@ -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"))
diff --git a/Library/Homebrew/test/cmd/linkapps_spec.rb b/Library/Homebrew/test/cmd/linkapps_spec.rb
index 2bca97822..8fc0d5eb9 100644
--- a/Library/Homebrew/test/cmd/linkapps_spec.rb
+++ b/Library/Homebrew/test/cmd/linkapps_spec.rb
@@ -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
diff --git a/Library/Homebrew/test/cmd/unlinkapps_spec.rb b/Library/Homebrew/test/cmd/unlinkapps_spec.rb
index e1170f435..397a8ec5e 100644
--- a/Library/Homebrew/test/cmd/unlinkapps_spec.rb
+++ b/Library/Homebrew/test/cmd/unlinkapps_spec.rb
@@ -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
diff --git a/docs/Manpage.md b/docs/Manpage.md
index 666be9803..cd3f87452 100644
--- a/docs/Manpage.md
+++ b/docs/Manpage.md
@@ -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
diff --git a/manpages/brew.1 b/manpages/brew.1
index 95088a1aa..10f58d294 100644
--- a/manpages/brew.1
+++ b/manpages/brew.1
@@ -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\.
.