exe/caravan in caravan-0.3.1 vs exe/caravan in caravan-0.4.0.beta

- old
+ new

@@ -21,11 +21,15 @@ opts.on("-m DEPLOY_MODE", "--mode DEPLOY_MODE", "Deploy mode") do |value| options[:mode] = value || "shell" end opts.on("-i IGNORE_FILES", "--ignore IGNORE_FILES", "Ignore files") do |value| - options[:ignore] = value || "\.(git|svn)$" + if options.key?(:ignore) + options[:ignore] << value + else + options[:ignore] = [value] + end end options[:debug] = false opts.on("-b", "--debug", "Debug mode") do options[:debug] = true @@ -33,10 +37,15 @@ opts.on_tail("--version", "Show version") do puts Caravan::VERSION exit end -end.parse!(ARGV) +end +if ARGV.size == 1 && ARGV[0] == "init" + Caravan.dump_default_conf +end + +option_parser.parse!(ARGV) if options.key?(:src) && options.key?(:dst) - Caravan.start(options) + Caravan.start(options) end