bin/spire in spire-0.1.6 vs bin/spire in spire-0.1.7

- old
+ new

@@ -2,18 +2,18 @@ require 'optparse' options = {} optparse = OptionParser.new do |opts| - opts.banner = "Usage: spire create folder" + opts.banner = "Usage: spire create app" opts.on('-h', '--help', 'Displays this usage screen') do puts optparse exit end - opts.on('create', '-c', 'Creates a new app.') do |params| + opts.on('-c', '-create DIR', 'Creates a new app/project with given name.') do |params| options[:create] = params end end @@ -22,8 +22,12 @@ rescue OptionParser::InvalidOption puts optparse exit 1 end -unless Dir.exists?(options[:create]) - system("git clone git://github.com/snicol/spire-base-app.git #{options[:create]}") -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 \ No newline at end of file