Sha256: 772910d20fcf8e9fc23a60afc2de620a3e01197d00c349aa7d309a98e3cca47c
Contents?: true
Size: 1.07 KB
Versions: 7
Compression:
Stored size: 1.07 KB
Contents
module Veewee module Provider module Core module BoxCommand def create_floppy(floppy_filename) # Todo Check for java # Todo check output of commands # Todo allow for .erb templates # Check for floppy unless definition.floppy_files.nil? require 'tmpdir' temp_dir=Dir.mktmpdir definition.floppy_files.each do |filename| full_filename=full_filename=File.join(definition.path,filename) FileUtils.cp("#{full_filename}","#{temp_dir}") end javacode_dir=File.expand_path(File.join(__FILE__,'..','..','..','..','..','java')) floppy_file=File.join(definition.path,floppy_filename) if File.exists?(floppy_file) env.logger.info "Removing previous floppy file" FileUtils.rm(floppy_file) end command="java -jar #{javacode_dir}/dir2floppy.jar \"#{temp_dir}\" \"#{floppy_file}\"" shell_exec("#{command}") end end end end end end
Version data entries
7 entries across 7 versions & 2 rubygems