require 'rake/clean'

src = 'ld10-samba.tex'
bin = 'ld10-samba.pdf'
tmp = FileList.new('*.aux', '*.log', '*.nav', '*.out', '*.snm', '*.toc')

CLEAN.add(tmp)
CLOBBER.add(bin)

task :default => :compile

desc "Give the speech"
task :play => bin do
  sh "pdfcube #{bin} --bgcolor 0:0:0"
  #sh "impressive #{bin}"
end

desc "Compile presentation"
task :compile => bin

file bin => src do
  sh "pdflatex #{src}; pdflatex #{src}"
  #sh "xelatex #{src}; xelatex #{src}"
end