Skip to content

Commit

Permalink
make brew-linkapps default to /Applications
Browse files Browse the repository at this point in the history
Also adds support for a new `--local` flag, and documentation for the whole command.

Closes Homebrew#22378.

Signed-off-by: Adam Vandenberg <[email protected]>
  • Loading branch information
ELLIOTTCABLE authored and adamv committed Sep 17, 2013
1 parent 352f702 commit 2e6b2c0
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Library/Contributions/cmd/brew-linkapps.rb
Original file line number Diff line number Diff line change
@@ -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."
Expand Down
8 changes: 8 additions & 0 deletions Library/Contributions/manpages/brew.1.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.

Expand Down
7 changes: 7 additions & 0 deletions share/man/man1/brew.1
Original file line number Diff line number Diff line change
Expand Up @@ -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\.
.
Expand Down

0 comments on commit 2e6b2c0

Please sign in to comment.