diff options
author | Wayne Meissner <wmeissner@gmail.com> | 2008-11-13 15:46:41 +1000 |
---|---|---|
committer | Wayne Meissner <wmeissner@gmail.com> | 2008-11-13 15:46:41 +1000 |
commit | 0662a3db0f538486c6039cf07dd30b4b50024d60 (patch) | |
tree | f37e55159b9e5d7d32d4b6336b68899d3e0871a6 /gen | |
parent | 3b0110a712f96b72427b21f9478ba41592391ef9 (diff) | |
download | ffi-0662a3db0f538486c6039cf07dd30b4b50024d60.tar.gz |
Tweak types.conf creation perms
Diffstat (limited to 'gen')
-rw-r--r-- | gen/Rakefile | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/gen/Rakefile b/gen/Rakefile index 48b58bf..376de0a 100644 --- a/gen/Rakefile +++ b/gen/Rakefile @@ -1,9 +1,10 @@ +require 'fileutils' require "#{File.join(ENV['RUBYLIBDIR'], 'ffi', 'tools', 'types_generator.rb')}" types_conf = File.join(ENV['RUBYLIBDIR'], 'ffi', 'types.conf') task types_conf do |task| options = {} - FileUtils.mkdir_p(File.dirname(task.name), { :mode => 0644 }) - File.open(task.name, "w") do |f| + FileUtils.mkdir_p(File.dirname(task.name), { :mode => 0755 }) + File.open(task.name, File::CREAT|File::TRUNC|File::RDWR, 0644) do |f| f.puts FFI::TypesGenerator.generate(options) end end |