################################ -*- Ruby -*- #################################
# Common tasks
#

desc "Generate README.md"
task "readme" do
  sh "emacs", "-batch",
     "-l", "../../font-lock-tools-admin/font-lock-tools-admin.el",
     "-L", "../../el2markdown",
     "../faceup.el", "-f", "font-lock-tools-admin-write-readme"
end

desc "Generating html"
task "html" => ["readme"] do
  File.open(File.join("..", "README.html"), "w") do |fh|
    fh.puts("<head>")
    fh.puts("  <meta charset=\"UTF-8\">")
    fh.puts("</head>")
  end
  sh "Markdown.pl ../README.md >> ../README.html"
end
