diff options
| author | Max Howell | 2009-06-26 12:58:32 +0100 |
|---|---|---|
| committer | Max Howell | 2009-06-26 12:58:32 +0100 |
| commit | a0c8640d96f65460ed1dd1a8b820665fcd8e3af4 (patch) | |
| tree | 9ec03e21a5b0699e387d4c38022d9fb1cfa23642 /Library | |
| parent | a390b713eb87958055759b7a3bd0f2abc19800e7 (diff) | |
| download | homebrew-a0c8640d96f65460ed1dd1a8b820665fcd8e3af4.tar.bz2 | |
Use FileUtils.chmod
Diffstat (limited to 'Library')
| -rw-r--r-- | Library/Formula/dmd.rb | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/Library/Formula/dmd.rb b/Library/Formula/dmd.rb index 9ad5784be..7193343db 100644 --- a/Library/Formula/dmd.rb +++ b/Library/Formula/dmd.rb @@ -9,31 +9,33 @@ class Dmd <Formula #use d and not dmd, rationale: meh prefix+'share'+'doc'+'d' end - + def install ohai "install" + man.mkpath + FileUtils.cp_r 'osx/bin', prefix FileUtils.cp_r 'osx/lib', prefix FileUtils.cp_r 'man/man1', man FileUtils.cp_r 'src', prefix - + #lol man5=man+'man5' man5.mkpath - (man+'man1'+'dmd.conf.5').mv man5 + man5.install man+'man1'+'dmd.conf.5' #lol ends - + html=doc+'html' samples=doc+'examples' #examples is the more typical directory name html.mkpath samples.mkpath - + FileUtils.cp_r Dir['html/d/*'], html unless ARGV.include? '--no-html' FileUtils.cp_r Dir['samples/d/*'], samples unless ARGV.include? '--no-samples' - # zip files suck TODO FileUtils.chmod - Dir.chdir(bin) { `chmod u+x dmd dumpobj obj2asm` } - + # zip files suck + FileUtils.chmod 0544, ['dmd','dumpobj','obj2asm'].collect{|x|"osx/bin/#{x}"} + (prefix+'bin'+'dmd.conf').open('w') do |f| f.puts "[Environment]" f.puts "DFLAGS=-I#{prefix}/src/phobos -L-L#{prefix}/lib" |
