61 Commits

Author SHA1 Message Date
Jack Nagel
227ee505b0 fetch: don't display cached location twice
The download strategy will print the cached location if we've already
fetched it, so avoid printing redundant information.

Also just "puts" it instead of using a second `ohai` line.

Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-04-02 21:04:30 -05:00
Adam Vandenberg
a161058bcd brew fetch: show downloaded path 2012-03-21 09:09:11 -07:00
Mike McQuaid
d47cf55f68 Use fetch for downloading bottles.
Fixes Homebrew/homebrew#10958.
2012-03-18 15:16:57 +13:00
Jack Nagel
5ab0488918 fetch: compare checksums case-insensitively
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-02-15 22:34:48 -06:00
Jack Nagel
1a3a1249bf Warn the user of required arguments
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-02-04 00:27:05 -06:00
Jack Nagel
f29c44d1fd fetch: use correct sha256 instance variable
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2011-10-09 15:56:15 -05:00
Charlie Sharpsteen
9d19506ee9 mirror support: Add mirror method to Formula.rb
Mirrors can now be declared using the `mirror` method which works similar to
`depends_on` and takes the same arguments as `url`.

The formula class now has a public `fetch` method that cycles through the
mirror list if the downloader for the primary URL throws a `DownloadError`.
Other brew commands, like brew-fetch, also benefit from mirror support by using
this method.

Closes Homebrew/homebrew#7574.
2011-09-19 09:24:43 -07:00
Jack Nagel
2505ebda67 fetch: fix '--force' for pathnames
`brew fetch --force` was a no-op for formula pathnames when that formula
did not exist in Library/Formula, because `brew --cache #{f.name}`
results in an error for that case.

Fix it by always using f.cached_download.

Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2011-09-01 19:17:13 -05:00
Birger J. Nordølum
5a10cc8e76 Added SHA-256 to the fetch command.
Signed-off-by: Adam Vandenberg <flangy@gmail.com>
2011-04-14 15:43:58 -07:00
Adam Vandenberg
d6382efdeb Add brew fetch --deps
`brew fetch --deps` will also cache the dependencies of any listed formulae.
2011-04-14 15:09:15 -07:00
Adam Vandenberg
b7e068b740 'brew fetch' now an official command 2011-03-12 11:55:11 -08:00