2009-03-21 06:40:53 +00:00
|
|
|
|
|
|
|
$:.unshift(File.dirname(__FILE__)) unless
|
|
|
|
$:.include?(File.dirname(__FILE__)) || $:.include?(File.expand_path(File.dirname(__FILE__)))
|
|
|
|
|
2009-01-26 04:15:40 +00:00
|
|
|
gem 'archive-zip'
|
|
|
|
require 'archive/zip'
|
|
|
|
require 'ftools'
|
|
|
|
|
|
|
|
WORKING_DIR=File.expand_path(File.dirname(__FILE__)+"/netboot65")
|
|
|
|
SRC_DIR=File.expand_path(File.dirname(__FILE__)+"/../")
|
2009-04-10 04:07:27 +00:00
|
|
|
["","client","lib","bin","boot","doc","inc","examples"].each do |dir_suffix|
|
2009-01-26 04:15:40 +00:00
|
|
|
dir_path="#{WORKING_DIR}/#{dir_suffix}"
|
|
|
|
Dir.mkdir(dir_path) unless File.exist?(dir_path)
|
|
|
|
end
|
|
|
|
|
|
|
|
[
|
|
|
|
["client/clients/utherboot.dsk","client/"],
|
2009-03-26 03:46:30 +00:00
|
|
|
["client/clients/rrnetboot.bin","client/"],
|
2009-04-10 10:51:19 +00:00
|
|
|
["client/clients/64nicboot.bin","client/"],
|
2009-01-26 04:15:40 +00:00
|
|
|
["server/lib/tftp_server.rb","lib"],
|
|
|
|
["server/bin/tftp_only_server.rb","bin/tftp_server.rb"],
|
|
|
|
["server/bin/import_ags_games.rb","bin"],
|
|
|
|
["server/boot/BOOTA2.PG2","boot"],
|
2009-03-28 13:58:41 +00:00
|
|
|
["doc/README.*.txt","doc"],
|
2009-04-10 04:07:27 +00:00
|
|
|
["doc/nb65_api_technical_reference.doc","doc"],
|
|
|
|
["client/inc/nb65_constants.i","inc"],
|
2009-04-10 04:19:15 +00:00
|
|
|
["client/examples/dasm_example.asm","examples/"],
|
2009-01-26 04:15:40 +00:00
|
|
|
].each do |args|
|
|
|
|
dest="#{WORKING_DIR}/#{args[1]}"
|
2009-03-26 03:46:30 +00:00
|
|
|
Dir["#{SRC_DIR}/#{args[0]}"].each do |src|
|
|
|
|
File.copy(src,dest)
|
|
|
|
puts "#{src}->#{dest}"
|
|
|
|
end
|
2009-01-26 04:15:40 +00:00
|
|
|
end
|
|
|
|
|
2009-03-21 06:40:53 +00:00
|
|
|
|
2009-01-26 04:15:40 +00:00
|
|
|
zipfile_name=File.dirname(__FILE__)+"/netboot65-#{Time.now.strftime("%Y-%m-%d")}.zip"
|
|
|
|
Archive::Zip.archive(zipfile_name, WORKING_DIR)
|