Sha256: 3fe7dc6f52a7763387ff6c3b0fee2b901adae78a2b1d2a8765318cfe79614a76

Contents?: true

Size: 626 Bytes

Versions: 1

Compression:

Stored size: 626 Bytes

Contents

desc 'Creates a sample config file.'
task :init do
  name = Rake.application.name
  config_file = Rake.application.rakefile

  unless File.exist?(config_file)
    puts "! You already have #{config_file}."
    exit 8
  end

  outfile = './config/deploy.rb'

  if File.exists?(outfile)
    print 'deploy.rb already exists, do you want to overwrite it? (y/n) '

    exit(8) if $stdin.readline.chomp.downcase != 'y'
  end

  require 'fileutils'
  FileUtils.mkdir_p './config'
  FileUtils.cp Mina.root_path('data/deploy.rb'), outfile

  puts "-----> Created #{outfile}"
  puts "Edit this file, then run `#{name} setup` after."
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
mina-1.2.4 tasks/mina/install.rb