aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Library/Contributions/manpages/brew.1.md4
-rw-r--r--Library/Homebrew/cmd/cleanup.rb4
-rw-r--r--share/man/man1/brew.17
3 files changed, 10 insertions, 5 deletions
diff --git a/Library/Contributions/manpages/brew.1.md b/Library/Contributions/manpages/brew.1.md
index a15fbfeb7..806762a94 100644
--- a/Library/Contributions/manpages/brew.1.md
+++ b/Library/Contributions/manpages/brew.1.md
@@ -54,13 +54,15 @@ For the full command list, see the COMMANDS section.
* `cat` <formula>:
Display the source to <formula>.
- * `cleanup [--force]` [<formula>]:
+ * `cleanup [--force] [-n]` [<formula>]:
For all installed or specific formulae, remove any older versions from the
cellar. By default, does not remove out-of-date keg-only brews, as other
software may link directly to specific versions.
If `--force` is passed, remove out-of-date keg-only brews as well.
+ If `-n` is passed, show what would be removed, but do not actually remove anything.
+
* `create [--autotools|--cmake] [--no-fetch]` <URL>:
Generate a formula for the downloadable file at <URL> and open it in
$EDITOR. Homebrew will attempt to automatically derive the formula name
diff --git a/Library/Homebrew/cmd/cleanup.rb b/Library/Homebrew/cmd/cleanup.rb
index 0f9f2c3cb..0aec10f56 100644
--- a/Library/Homebrew/cmd/cleanup.rb
+++ b/Library/Homebrew/cmd/cleanup.rb
@@ -13,7 +13,7 @@ module Homebrew extend self
end
end
# seems like a good time to do some additional cleanup
- Homebrew.prune
+ Homebrew.prune unless ARGV.include? '-n'
else
ARGV.formulae.each do |f|
cleanup_formula f
@@ -36,7 +36,7 @@ module Homebrew extend self
f.rack.children.each do |keg|
if f.installed_prefix != keg
print "Removing #{keg}..."
- rm_rf keg
+ rm_rf keg unless ARGV.include? '-n'
puts
end
end
diff --git a/share/man/man1/brew.1 b/share/man/man1/brew.1
index a87394bf7..af6c637fb 100644
--- a/share/man/man1/brew.1
+++ b/share/man/man1/brew.1
@@ -1,7 +1,7 @@
.\" generated with Ronn/v0.7.3
.\" http://github.com/rtomayko/ronn/tree/0.7.3
.
-.TH "BREW" "1" "October 2011" "Homebrew" "brew"
+.TH "BREW" "1" "November 2011" "Homebrew" "brew"
.
.SH "NAME"
\fBbrew\fR \- The missing package manager for OS X
@@ -64,12 +64,15 @@ If \fB\-\-strict\fR is passed, perform additional stricter checks that may not n
Display the source to \fIformula\fR\.
.
.TP
-\fBcleanup [\-\-force]\fR [\fIformula\fR]
+\fBcleanup [\-\-force] [\-n]\fR [\fIformula\fR]
For all installed or specific formulae, remove any older versions from the cellar\. By default, does not remove out\-of\-date keg\-only brews, as other software may link directly to specific versions\.
.
.IP
If \fB\-\-force\fR is passed, remove out\-of\-date keg\-only brews as well\.
.
+.IP
+If \fB\-n\fR is passed, show what would be removed, but do not actually remove anything\.
+.
.TP
\fBcreate [\-\-autotools|\-\-cmake] [\-\-no\-fetch]\fR \fIURL\fR
Generate a formula for the downloadable file at \fIURL\fR and open it in $EDITOR\. Homebrew will attempt to automatically derive the formula name and version, but if it fails, you\'ll have to make your own template\. The wget formula serves as a simple example\.