#!/usr/bin/env ruby $:.unshift(File.join(File.dirname(__FILE__), "..", "lib")) root_dir = ::File.expand_path( ::File.join(::File.dirname(__FILE__), "..", "ebin") ) if ARGV.size > 0 @name = ARGV.shift @version = ARGV.shift || "0.1" end @version ||= "0.1" @name ||= ::File.basename(::File.dirname( root_dir )) INCLUDE = "include" ERLC_FLAGS = "-I#{INCLUDE}" cmd = "cd #{root_dir} && NAME=#{@name} VERSION=#{@version} rake build_boot_scripts" puts "** Building #{@name} **" puts "Running command #{cmd}" %x[#{cmd}]