diff options
| author | Clinton R. Nixon | 2009-09-22 12:31:53 -0400 |
|---|---|---|
| committer | Clinton R. Nixon | 2009-09-23 14:51:11 -0400 |
| commit | 9713b07890effbcfe08e89100a55f446abc6ab87 (patch) | |
| tree | 59c695ac8b541935d5927d114ce37ed9db85db2d /Library/Formula | |
| parent | b8c17e90f703e6e327a2c307be706d8269caf717 (diff) | |
| download | homebrew-9713b07890effbcfe08e89100a55f446abc6ab87.tar.bz2 | |
Added small DSL for formulas
You can now use "url", "version", "homepage", and any checksums as
class methods, like so:
class Dos2unix <Formula
url 'http://www.sfr-fresh.com/linux/misc/old/dos2unix-3.1.tar.gz'
md5 '25ff56bab202de63ea6f6c211c416e96'
homepage 'http://www.sfr-fresh.com/linux/misc/'
end
The previous usage ("@url = 'http://example.com/tarball.tgz'") still
works, maintaining compatibility with previous formulas.
"dos2unix.rb" is translated into the new format as an example.
Diffstat (limited to 'Library/Formula')
| -rw-r--r-- | Library/Formula/dos2unix.rb | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/Library/Formula/dos2unix.rb b/Library/Formula/dos2unix.rb index 48a3098d2..bba4a31b3 100644 --- a/Library/Formula/dos2unix.rb +++ b/Library/Formula/dos2unix.rb @@ -1,9 +1,9 @@ require 'brewkit' class Dos2unix <Formula - @url='http://www.sfr-fresh.com/linux/misc/old/dos2unix-3.1.tar.gz' - @md5='25ff56bab202de63ea6f6c211c416e96' - @homepage='http://www.sfr-fresh.com/linux/misc/' + url 'http://www.sfr-fresh.com/linux/misc/old/dos2unix-3.1.tar.gz' + md5 '25ff56bab202de63ea6f6c211c416e96' + homepage 'http://www.sfr-fresh.com/linux/misc/' def install File.unlink 'dos2unix' |
