Sha256: 8bc90072f9cde688074781dabeb3b3b1339810c4746fd52e56f30c398a89b3e0
Contents?: true
Size: 671 Bytes
Versions: 13
Compression:
Stored size: 671 Bytes
Contents
#!/usr/bin/env ruby begin require 'copy' rescue LoadError require 'rubygems' require 'copy' end require 'copy/version' require 'optparse' OptionParser.new do |opts| opts.banner = "Usage: copy [options]" opts.on('-n', '--new [DIR]', 'Create a new Copy site in DIR') do |dir| dir ||= '.' site = File.dirname(File.expand_path(__FILE__)) + '/../lib/copy/generators/site/' puts `mkdir -p #{dir} && cp -Riv #{site} #{dir}` puts "Done!" exit(0) end opts.on('-v', '--version') { puts "Copy v#{Copy::VERSION}"; exit(0) } end.parse! puts "Run `copy -n DIR' to generate a new Copy site in DIR." puts "Run `copy --help' for all options." exit(0)
Version data entries
13 entries across 13 versions & 2 rubygems