aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAdam Vandenberg2011-04-18 21:11:08 -0700
committerAdam Vandenberg2011-04-18 21:11:08 -0700
commite08ef940beaeb8251d7db0645bbc980535f481e5 (patch)
treeab954a756d37109eeed0abdfb62ebefe4654ee6b
parent80ba991324162b4839329a7a9672e980a2975ae6 (diff)
downloadbrew-e08ef940beaeb8251d7db0645bbc980535f481e5.tar.bz2
Add --force to brew cleanup
-rw-r--r--Library/Contributions/manpages/brew.1.md7
-rw-r--r--Library/Homebrew/cmd/cleanup.rb2
-rw-r--r--share/man/man1/brew-man.12
-rw-r--r--share/man/man1/brew.17
4 files changed, 12 insertions, 6 deletions
diff --git a/Library/Contributions/manpages/brew.1.md b/Library/Contributions/manpages/brew.1.md
index 3030f3b8d..8c5b018ca 100644
--- a/Library/Contributions/manpages/brew.1.md
+++ b/Library/Contributions/manpages/brew.1.md
@@ -146,9 +146,12 @@ didn't include with OS X.
* `cat` <formula>:
Display the source to <formula>.
- * `cleanup` [<formula>]:
+ * `cleanup [--force]` [<formula>]:
For all installed or specific formulae, remove any older versions from the
- cellar.
+ 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.
* `log [git-log-options]` <formula> ...:
Show the git log for the given formulae. Options that `git-log`(1)
diff --git a/Library/Homebrew/cmd/cleanup.rb b/Library/Homebrew/cmd/cleanup.rb
index c01f4b18f..6254983b9 100644
--- a/Library/Homebrew/cmd/cleanup.rb
+++ b/Library/Homebrew/cmd/cleanup.rb
@@ -28,7 +28,7 @@ module Homebrew extend self
# Don't clean up keg-only brews for now.
# Formulae link directly to them, so cleaning up old
# ones will break already compiled software.
- if f.keg_only?
+ if f.keg_only? and not ARGV.force?
opoo "Skipping keg-only #{f.name}" if rack.children.length > 1
return
end
diff --git a/share/man/man1/brew-man.1 b/share/man/man1/brew-man.1
index c3d802e43..24bd05a4e 100644
--- a/share/man/man1/brew-man.1
+++ b/share/man/man1/brew-man.1
@@ -1,7 +1,7 @@
.\" generated with Ronn/v0.7.3
.\" http://github.com/rtomayko/ronn/tree/0.7.3
.
-.TH "BREW\-MAN" "1" "January 2011" "Homebrew" "brew"
+.TH "BREW\-MAN" "1" "March 2011" "Homebrew" "brew"
.
.SH "NAME"
\fBbrew\-man\fR \- Generate man pages for Homebrew
diff --git a/share/man/man1/brew.1 b/share/man/man1/brew.1
index c394dd7f6..e4726c58b 100644
--- a/share/man/man1/brew.1
+++ b/share/man/man1/brew.1
@@ -163,8 +163,11 @@ Check your system for potential problems\.
Display the source to \fIformula\fR\.
.
.TP
-\fBcleanup\fR [\fIformula\fR]
-For all installed or specific formulae, remove any older versions from the cellar\.
+\fBcleanup [\-\-force]\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\.
.
.TP
\fBlog [git\-log\-options]\fR \fIformula\fR \.\.\.