lib/Charu/Config.rb in Charu-0.0.11 vs lib/Charu/Config.rb in Charu-0.0.12

- old
+ new

@@ -47,19 +47,30 @@ @ftp_server = "" @ftp_port = "21" @ftp_user = "" @ftp_pass = "" - # Wgetのパス - @wget_path = "" + # Wgetのパス + @wget_path = "" end end end ' +autoupload_lftp = "" +autoupload_lftp = ' +<% require "./CharuConfig/CharuConfig" %> +<% config = Charu::Config.new() %> + +open "<%= config.ftp_server %>" -p <%= config.ftp_port %> -u "<%= config.ftp_user %>","<%= config.ftp_pass %>" +cd "./" +lcd "<%= config.www_html_out_path %>" +mirror -R +' + # ディレクトリの確認 if Dir.exist?("./CharuConfig") == false then # ディレクトリの作成 Dir.mkdir('CharuConfig') end @@ -69,6 +80,18 @@ f.puts(config) end else require './CharuConfig/CharuConfig' end + + +#autoupload_lftp +if File.exist?("./CharuConfig/autoupload.lftp") == false then + File.open("./CharuConfig/autoupload.lftp", "w:utf-8") do |f| + f.puts(autoupload_lftp) + end +else + +end + +