diff options
| author | Adam Vandenberg | 2012-08-22 21:41:04 -0700 |
|---|---|---|
| committer | Adam Vandenberg | 2012-08-22 21:41:04 -0700 |
| commit | 0697c8f3bea5001c7d43292d4f49a9b62c2448bf (patch) | |
| tree | 1d5b219a822ccd96b119dd53294a300feaa0875e /Library/Formula | |
| parent | 713773192a3b0a0b17a350a76f5d58b63f1fc994 (diff) | |
| download | homebrew-0697c8f3bea5001c7d43292d4f49a9b62c2448bf.tar.bz2 | |
salt: use new dsl
Diffstat (limited to 'Library/Formula')
| -rw-r--r-- | Library/Formula/salt.rb | 16 |
1 files changed, 6 insertions, 10 deletions
diff --git a/Library/Formula/salt.rb b/Library/Formula/salt.rb index b6034f596..4e8ddc431 100644 --- a/Library/Formula/salt.rb +++ b/Library/Formula/salt.rb @@ -69,15 +69,11 @@ class SaltVEGA < Formula end class Salt < Formula - url 'http://supernovae.in2p3.fr/~guy/salt/download/snfit-2.2.2b.tar.gz' homepage 'http://supernovae.in2p3.fr/~guy/salt/' + url 'http://supernovae.in2p3.fr/~guy/salt/download/snfit-2.2.2b.tar.gz' md5 'bf227accaf89a751c28d0bf1ed2b0851' - def options - [ - ['--with-data', 'Install model data'] - ] - end + option 'with-data', 'Install model data' def install_subbrew(subbrew, installdir) s = subbrew.new @@ -108,10 +104,10 @@ class Salt < Formula # install all the model data # http://supernovae.in2p3.fr/~guy/salt/download/snls3-intallation.sh - if ARGV.include? '--with-data' - data = prefix + 'data' + if build.include? 'with-data' + data = prefix/'data' data.mkpath - File.open(data+'fitmodel.card', 'w') do |fitmodel| + File.open(data/'fitmodel.card', 'w') do |fitmodel| # salt2 model + magsys [SaltSALT2, SaltVEGA, SaltSDSS_AB_off, SaltVEGAHST].each do |cls| fitmodel.write(install_subbrew(cls, data)) @@ -140,7 +136,7 @@ class Salt < Formula end def caveats - if ARGV.include? '--with-data' + if build.include? 'with-data' <<-EOS.undent You should add the following to your .bashrc or equivalent: export PATHMODEL=#{prefix}/data |
