#!/usr/bin/ruby -w #*********************************************************************** #* Rwd/shell -- A Ruby program for the RudyWebDialog. #* Copyright (c) 2004, 2005 by Steven Gibson. All Rights Reserved. #* at "steven@superant.com". #***********************************************************************/ require 'fileutils' load 'configuration/rwdshell.dist' $progdir = File::expand_path( File.dirname(__FILE__)) results = " " puts "creating rwdshell distribution files version #{RwdShellVersion}" puts "cleaning conf files" `tests/cleancnf.sh` puts "moving up one directory" Dir.chdir("..") zipcreatecmd = "zip -r rwdshell-#{RwdShellVersion}.zip rwdshell" puts "#{zipcreatecmd}" `#{zipcreatecmd}` tarcreatecmd = "tar --gzip -cf rwdshell-#{RwdShellVersion}.tar.gz rwdshell" puts "#{tarcreatecmd}" `#{tarcreatecmd}` tarcreatecmd2 = "tar --bzip2 -cf rwdshell-#{RwdShellVersion}.tar.bz2 rwdshell" puts "#{tarcreatecmd2}" `#{tarcreatecmd2}` gemspecfilename = "rwdshell-#{RwdShellVersion}.gemspec" tobject = Time.now year = tobject.year.to_s month = tobject.mon.to_s daydate = tobject.day.to_s fd = File.open(gemspecfilename,"w") fd.print("Gem::Specification.new do |s|\n") fd.print(" s.name = %q{rwdshell}\n") fd.print(" s.version = \"#{RwdShellVersion}\"\n") fd.print(" s.date = %q{#{year}-#{month}-#{daydate}}") load 'rwdshell/tests/gemspec' fd.print($gemspecvar) fd.close print Dir["rwdshell*.{gz,bz2,deb,gem}"]