Sha256: bc61a20480862e7b23093dedd71d0da3e14b3004a5b042d313373333dcd12a47
Contents?: true
Size: 921 Bytes
Versions: 4
Compression:
Stored size: 921 Bytes
Contents
#!/usr/bin/env ruby if ARGV.empty? puts "Usage: frank [PROJECT_NAME]" puts "Stubs out a template project; if a .frank folder was found, copies it over as your project base" exit end puts "\n-----------------------\n Frank:\n" project = ARGV.first libdir = File.join(File.dirname(File.expand_path(__FILE__)), '../lib') dot_frank = File.join(ENV['HOME'], '.frank') puts " - Creating '#{project}'" begin Dir.mkdir project rescue Errno::EEXIST puts " uh oh, #{project} already exists..." exit end # If they have a .frank, copy contents to new project folder if File.directory? dot_frank puts " - Copying .frank template" FileUtils.cp_r( File.join(dot_frank, '.'), project ) else # Otherwise just copy over the template project puts " - Copying Frank template" FileUtils.cp_r( Dir.glob(File.join(libdir, 'template/*')), project ) end puts "\n Congratulations, '#{project}' is ready to go.\n\n"
Version data entries
4 entries across 4 versions & 1 rubygems
Version | Path |
---|---|
frank-0.1.3 | bin/frank |
frank-0.1.2 | bin/frank |
frank-0.1.1 | bin/frank |
frank-0.1.0 | bin/frank |