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-01-26 10:42:03 +00:00
|
|
|
["","client","lib","bin","boot",].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/"],
|
|
|
|
["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-01-26 10:42:03 +00:00
|
|
|
["doc/README.txt",""],
|
2009-01-26 04:15:40 +00:00
|
|
|
].each do |args|
|
|
|
|
src="#{SRC_DIR}/#{args[0]}"
|
|
|
|
dest="#{WORKING_DIR}/#{args[1]}"
|
|
|
|
File.copy(src,dest)
|
|
|
|
end
|
|
|
|
|
|
|
|
zipfile_name=File.dirname(__FILE__)+"/netboot65-#{Time.now.strftime("%Y-%m-%d")}.zip"
|
|
|
|
Archive::Zip.archive(zipfile_name, WORKING_DIR)
|