118 Commits

Author SHA1 Message Date
Jack Nagel
5ebf0416ce cleanup: look for "HEAD", not "sha" in receipt
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-09-20 16:47:00 -05:00
Jack Nagel
1c22f03850 cleanup: skip rm_DS_Store during a dry run
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-09-11 14:41:01 -05:00
Jack Nagel
d5299f4946 cleanup: allow --force to remove keg-only brews again
Fixes Homebrew/homebrew#14840.

Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-09-11 14:29:33 -05:00
Max Howell
05b91e3d29 Figure out if we can cleanup keg-only kegs 2012-08-29 12:41:33 -04:00
Max Howell
ad80c616b8 brew cleanup removes .DS_Store files
Probably slow, but we hate these fuckers.
2012-08-13 10:14:59 -04:00
Misty De Meo
f17429f842 ARGV: add .dry_run? method
Add an ARGV.dry_run? helper method for '--dry-run'/'-n' now that
'-n' is being used as a git-style dry-run in two commands.

Closes Homebrew/homebrew#12898.

Signed-off-by: Misty De Meo <mistydemeo@gmail.com>
2012-07-09 12:01:09 -05:00
Mike McQuaid
a1ce504e7d Cleanup old bottles. 2012-04-30 21:37:58 +08:00
Max Howell
981605d199 Don't cleanup the wrong things
This still isn't perfect, but it will handle hyphens in formula-names better now. A proper solution is not easy or maybe even possible unless we ban hyphens in versions AND formula names, or use a different character as a separate in downloaded cache files which we then ban from formula-name and version strings.

Refs Homebrew/homebrew#2923.
2012-03-09 15:25:09 +00:00
Max Howell
4e3c99d96f Don't attempt to cleanup source checkouts
Fixes Homebrew/homebrew#10751.
2012-03-07 17:14:06 +00:00
Max Howell
158efd8c9a brew cleanup cleans up the download-cache
Manpage updated.

The -s switch is "scrub" and removes downloads for uninstall formula which are downloads for the latest version of that formula still.

Please NOTE cache is NOT cleaned if a formula argument is provided. I couldn't be bothered. Patches welcome :)

Closes Homebrew/homebrew#2923.
2012-03-06 20:28:06 +00:00
Jack Nagel
0cc3eb296d cleanup: add an option to perform a 'dry run'
Sometimes you want to know what `brew cleanup` will do before it
actually removes anything. Introduce a '-n' option (chosen to match
other UNIX tools) to do this.

Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2011-11-07 22:46:36 -06:00
Charlie Sharpsteen
94dba21f7d Centralize definition of rack in formula.rb
`rack` is a commonly used alias for `formula.prefix.parent`---so common that it
gets defined and used quite a bit. This patch makes `rack` an official method
of the `Formula` class.
2011-09-16 08:55:38 -07:00
Max Howell
e9aaef0e25 Revise cleanup text, we're removing, not uninstalling 2011-08-24 22:30:42 +01:00
Adam Vandenberg
e08ef940be Add --force to brew cleanup 2011-04-18 21:11:08 -07:00
Adam Vandenberg
0e0d72e49f brew cleanup - do not clean up keg-only brews for now 2011-03-12 11:55:11 -08:00
Adam Vandenberg
bcf8bb5a7f brew cleanup - fix formula name in warning 2011-03-12 11:55:11 -08:00
Adam Vandenberg
f0b6f6853a Silence cleanup warning
When a cellar exists for an unknown formula, no longer print a warning.
External tools using Brew to manage diy-installs will create a large
number of non-formula cellars.
2011-03-12 11:55:10 -08:00
Max Howell
768910283a Refactor the brew command into one file per command
The code was sucking. To the extent that maintenance was hard. It's a lot
easier to work with code that is sensibly split at sensible boundaries. So
now it is more like that.

But the refactor is minimal. Because we don't want you to have more merge
hell than absolutely necessary.

If you merge you will need to pay attention to brew.h.rb (as it is deleted)
and bin/brew (as command logic is gone). It will be painful, but you will just
have to help git out by moving any changes around manually.

Note compatibility.rb. It ensures that any function renames or removals don't
break anything. We're pretty serious about backwards compatibility. And that's
because we encourage you to hack around with the innards. And we couldn't do
that if we would then just make stuff disappear behind your back.
2011-03-12 11:55:02 -08:00