306 Commits

Author SHA1 Message Date
Max Howell
543a113712 Some subdirs and renames to aid homebrew n00bs
The classes better reflect their contents. I'm sure this change may be
contentious, but I am a sucker for trying to create source bases that are easy
to get to grips with and easy to navigate.

brewkit.rb is now a deprecated file.
2009-10-15 16:51:53 +01:00
Steve Losh
287cc0dc02 Determine the repo path in a symlink-friendly way.
The Contributions/selflink.sh script does not symlink the .git directory,
so 'brew update' will fail because the prefix (/usr/local/) is not a git
repository.

To determine the actual location of the git repo we can get the realpath
of the Library (to expand any symlinks) and take the parent of that.
2009-09-30 15:07:23 +01:00
Max Howell
55025865eb Fixes Homebrew/homebrew#68, let's not break fresh Homebrew installs
Thanks to boztek for spotting this. I'll commit a test shortly.
2009-09-30 03:10:25 +01:00
Andre Arko
d3954d3d77 Add HOMEBREW_REPOSITORY prefix for brew up
Signed-off-by: Max Howell <max@methylblue.com>

I removed whitespace changes and changed readlink to realpath as readlink raises if it's not a link.
2009-09-29 23:34:16 +01:00
Piotr Usewicz
4ed3834be0 Add full version and build numbers to user agent
Signed-off-by: Max Howell <max@methylblue.com>

I adapted it slightly based on the user agent that Safari gives.
2009-09-25 01:24:05 +01:00
Max Howell
c28bd7b571 Allow formulae to use __END__
For this to work the "running script" must be the formulae file. Making this
so wasn't so hard, there is now an install.rb script which is included with
the -r flag to the ruby executable. An at_exit handler calls the install
function.

Having the install logic in its own file made it feel like there was so much
space that I added extra error handling. So there is something to be said for
separating functionality out into its own files.

Still the error handling sucks, we'll need to marshall the exception back to
the bin/brew command. Which is another PITA.

Still overall I think this will prove worthwhile. But if it doesn't we'll
revert.

As a first usage, you can put a diff after __END__ and return DATA from
Formula::patches to make Homebrew aware of it.
2009-09-16 14:49:06 +01:00