#!/usr/bin/env ruby # # Created by Luke Bayes on 2007-4-29. # Copyright (c) 2007. All rights reserved. begin require 'rubygems' rescue LoadError # no rubygems to load, so we fail silently end require 'optparse' require 'sprout' #require File.dirname(__FILE__) + '/../lib/sprout' include PatternPark OPTIONS = { :locations => [], :project_name => nil, :sprout_name => nil, :update => false, :update => false, :clean => false } parser = OptionParser.new do |opts| opts.banner = < 0) Sprout.insert_locations(OPTIONS[:locations]) end if(sprout_name.nil?) puts "\n[ERROR] You MUST provide a sprout name, this is usually done with the -s [NAME] commandline option. Please enter a sprout name now:\n" sprout_name = gets end if(update) msg = <> Creating Sprout #{sprout_name} at #{path}" Sprout.project_name = project_name TemplateResolver.instance.replace_all = true sprout = Sprout.load(sprout_name) sprout.execute end if(sprout_name && update && !project_name) sprout = Sprout.load(sprout_name) sprout.execute end Log.flush