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

Version Path
copy_no_dependency-0.2.0 bin/copy
copy-0.2.0 bin/copy
copy-0.1.7 bin/copy
copy-0.1.6 bin/copy
copy-0.1.5 bin/copy
copy-0.1.4 bin/copy
copy-0.1.3 bin/copy
copy-0.1.2 bin/copy
copy-0.1.1 bin/copy
copy-0.1.0 bin/copy
copy-0.0.41 bin/copy
copy-0.0.4 bin/copy
copy-0.0.3 bin/copy