aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorelliottcable2013-09-07 12:52:55 -0500
committerAdam Vandenberg2013-09-17 06:52:56 -0700
commite8a892068ecfe853f2f363764f228b9335d9bcab (patch)
tree7f101a741a226da5303abbb2f1e23882dd999c87
parenta126946a9be8a1915ce516a674ffe4663583f691 (diff)
downloadbrew-e8a892068ecfe853f2f363764f228b9335d9bcab.tar.bz2
make brew-linkapps default to /Applications
Also adds support for a new `--local` flag, and documentation for the whole command. Closes Homebrew/homebrew#22378. Signed-off-by: Adam Vandenberg <flangy@gmail.com>
-rwxr-xr-xLibrary/Contributions/cmd/brew-linkapps.rb4
-rw-r--r--Library/Contributions/manpages/brew.1.md8
-rw-r--r--share/man/man1/brew.17
3 files changed, 17 insertions, 2 deletions
diff --git a/Library/Contributions/cmd/brew-linkapps.rb b/Library/Contributions/cmd/brew-linkapps.rb
index 41f1459a2..571aedc73 100755
--- a/Library/Contributions/cmd/brew-linkapps.rb
+++ b/Library/Contributions/cmd/brew-linkapps.rb
@@ -1,7 +1,7 @@
-# Links any Applications (.app) found in installed prefixes to ~/Applications
+# Links any Applications (.app) found in installed prefixes to /Applications
require 'keg'
-TARGET_DIR = ARGV.include?("--system") ? "/Applications" : File.expand_path("~/Applications")
+TARGET_DIR = ARGV.include?("--local") ? File.expand_path("~/Applications") : "/Applications"
unless File.exist? TARGET_DIR
opoo "#{TARGET_DIR} does not exist, stopping."
diff --git a/Library/Contributions/manpages/brew.1.md b/Library/Contributions/manpages/brew.1.md
index e2b94821e..2fff4801e 100644
--- a/Library/Contributions/manpages/brew.1.md
+++ b/Library/Contributions/manpages/brew.1.md
@@ -220,6 +220,14 @@ Note that these flags should only appear after a command.
If `--force` is passed, Homebrew will allow keg-only formulae to be linked.
+ * `linkapps [--local]`:
+ Find all installed formulae that have compiled `.app`-style "application"
+ packages for OS X, and symlink those apps into `/Applications`, allowing
+ for easier access.
+
+ If provided, `--local` will move them into the user's `~/Applications`
+ folder instead of the system folder. It may need to be created, first.
+
* `ls, list [--unbrewed] [--versions] [--pinned]` [<formulae>]:
Without any arguments, list all installed formulae.
diff --git a/share/man/man1/brew.1 b/share/man/man1/brew.1
index 1f81c74c7..60c359427 100644
--- a/share/man/man1/brew.1
+++ b/share/man/man1/brew.1
@@ -240,6 +240,13 @@ If \fB\-\-dry\-run\fR or \fB\-n\fR is passed, Homebrew will list all files which
If \fB\-\-force\fR is passed, Homebrew will allow keg\-only formulae to be linked\.
.
.TP
+\fBlinkapps [\-\-local]\fR
+Find all installed formulae that have compiled \fB\.app\fR\-style "application" packages for OS X, and symlink those apps into \fB/Applications\fR, allowing for easier access\.
+.
+.IP
+If provided, \fB\-\-local\fR will move them into the user\'s \fB~/Applications\fR folder instead of the system folder\. It may need to be created, first\.
+.
+.TP
\fBls, list [\-\-unbrewed] [\-\-versions] [\-\-pinned]\fR [\fIformulae\fR]
Without any arguments, list all installed formulae\.
.