Permalink
Browse files

Rakefile: constantised name of HTML output file.

  • Loading branch information...
1 parent f79cd1f commit dc815dca47006007ed8c669f0f56fe4932a4dbad @runpaint committed May 10, 2009
Showing with 5 additions and 4 deletions.
  1. +5 −4 Rakefile
View
@@ -1,5 +1,6 @@
SOURCE_HTML = FileList['text/**/*.html']
IMAGES = FileList['images/*']
+OUTPUT_HTML = 'output/all.html'
directory "output"
@@ -10,22 +11,22 @@ task :images => IMAGES do |t|
end
end
-task 'output/all.html' => [:output, :images]
-file 'output/all.html' => FileList['text/**/*.html'] do |t|
+task OUTPUT_HTML => [:output, :images]
+file OUTPUT_HTML => FileList['text/**/*.html'] do |t|
File.open(t.name,'w') do |out|
SOURCE_HTML.sort.each do |source|
out.puts File.open(source).read
end
end
end
-file 'output/vim-recipes.pdf' => 'output/all.html' do |t|
+file 'output/vim-recipes.pdf' => OUTPUT_HTML do |t|
system("prince #{t.prerequisites.first} #{t.name}")
end
task :pdf => 'output/vim-recipes.pdf'
-task :ilinks => ['output/all.html'] do |t|
+task :ilinks => OUTPUT_HTML do |t|
require 'hpricot'
target = {}
source = {}

0 comments on commit dc815dc

Please sign in to comment.