1
0
Fork 0
mirror of https://github.com/capistrano/capistrano synced 2023-03-27 23:21:18 -04:00

Adding some comments here, these are preliminary steps and may reflect how I structure the includes.

This commit is contained in:
Lee Hambley 2009-05-20 21:03:15 +01:00
parent 72f393b022
commit 4b5999f5f2

View file

@ -1,6 +1,7 @@
#!/usr/bin/env ruby
require 'optparse'
require 'fileutils'
OptionParser.new do |opts|
opts.banner = "Usage: #{File.basename($0)} [path]"
@ -45,6 +46,21 @@ files = {
set :application, "set your application name here"
set :repository, "set your repository location here"
# If you have previously been relying upon the code to start, stop
# and restart your mongrel application, or if you rely on the database
# migration code, please uncomment the lines you require below
# require 'recipes/rails/mongrel'
# require 'recipes/rails/migrations'
# require 'recipes/rails/passenger_mod_rails'
# There are also new utility libaries shipped with the core these
# include the following, please see individual files for more
# documentation, or run `cap -T` with the following lines commented out
# to see what they make available.
# require 'recipes/apache'
# If you aren't deploying to /u/apps/\#{application} on the target
# servers (which is the default), you can specify the actual location
# via the :deploy_to variable:
@ -68,7 +84,9 @@ files.each do |file, content|
elsif File.exists?(file.downcase)
warn "[skip] `#{file.downcase}' exists, which could conflict with `#{file}'"
elsif !File.exists?(File.dirname(file))
warn "[skip] directory `#{File.dirname(file)}' does not exist"
FileUtils.mkdir(File.dirname(file))
retry
warn "[skip] directory `#{File.dirname(file)}' did not exist, created."
else
puts "[add] writing `#{file}'"
File.open(file, "w") { |f| f.write(content) }