Sha256: 1554179eb312a5fdc7558194eb0bf26f156eb74d3d720a0c96bfd222d2e1a945
Contents?: true
Size: 742 Bytes
Versions: 228
Compression:
Stored size: 742 Bytes
Contents
$LOAD_PATH.unshift File.join(File.dirname(__FILE__), '..', 'lib') require 'fileutils' require 'ffi' require 'ffi/platform' require 'ffi/tools/types_generator' types_conf = File.expand_path(File.join(FFI::Platform::CONF_DIR, 'types.conf')) logfile = File.join(File.dirname(__FILE__), 'log') file types_conf do |task| options = {} 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 File.open(logfile, 'w') do |log| log.puts(types_conf) end end task :default => types_conf do end task :clean do File.readlines(logfile).each do |file| file.strip! rm_f file end rm_f logfile end
Version data entries
228 entries across 183 versions & 23 rubygems