require 'rake' require 'optparse' require 'fileutils' module DemoInstaller def proceed(target,source,banner) options = { } options[:target]="#{target}" OptionParser.new do |opts| opts.banner =banner +<//bin/ # and demo is expected to be in //demo def installDefaultDemo(scriptFullPath) scriptFullPath=File.expand_path(scriptFullPath) dn=File.dirname(scriptFullPath) bn=File.basename(scriptFullPath) target=File.basename(File.dirname(dn)) source="#{dn}/../demo" banner=%{#{bn} installs a demo project in target directory.} #puts "target=>#{target}<" #puts "source=>#{source}<" #puts "banner=>#{banner}<" proceed(target,source,banner) end end