diff options
-rw-r--r-- | documentation/Rakefile | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/documentation/Rakefile b/documentation/Rakefile new file mode 100644 index 000000000..117c3052f --- /dev/null +++ b/documentation/Rakefile @@ -0,0 +1,26 @@ +htmlfiles = [] + +CLEAN = [] + +FileList['*.rst'].each do |src| + name = src.sub(".rst", ".html") + htmlfiles << name + CLEAN << name + file name => src do + sh %{rst2html #{src} > #{name}} + end +end + +task :clean do + CLEAN.each do |file| + if FileTest.directory?(file) + sh %{rm -rf #{file}} + elsif FileTest.exists?(file) + File.unlink(file) + end + end +end + +task :html => htmlfiles + +task :default => :html |