Sha256: f20d5f531bbe4e88633beca70eb5bd4350122c2e176f2ac1dd2e7b11f509117e

Contents?: true

Size: 625 Bytes

Versions: 9

Compression:

Stored size: 625 Bytes

Contents

#!/usr/bin/ruby

require 'optparse'
options = {}

optparse = OptionParser.new do |opts|
  opts.banner = "Usage: spire create app"

	opts.on('-h', '--help', 'Displays this usage screen') do
		puts optparse
		exit
	end

	opts.on('-c', '-create DIR', 'Creates a new app/project with given name.') do |params|
		options[:create] = params
	end	
	
end

begin
  optparse.parse!
rescue OptionParser::InvalidOption
  puts optparse
  exit 1
end

if options[:create]
  unless Dir.exists?(options[:create]) 
	  system("git clone git://github.com/snicol/spire-base-app.git #{options[:create]}")
  end
else
  puts "No arguments given!"
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
spire-0.3.0 bin/spire
spire-0.2.4 bin/spire
spire-0.2.3 bin/spire
spire-0.2.2 bin/spire
spire-0.2.0 bin/spire
spire-0.1.10 bin/spire
spire-0.1.9 bin/spire
spire-0.1.8 bin/spire
spire-0.1.7 bin/spire