From 8c948bbb95c2712ab56e84588c49ab7c3909c491 Mon Sep 17 00:00:00 2001 From: Burke Libbey Date: Tue, 30 Mar 2010 14:55:26 -0500 Subject: [PATCH] fixed -o option --- bin/rocco | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/rocco b/bin/rocco index aaa526f..3f52f48 100755 --- a/bin/rocco +++ b/bin/rocco @@ -90,7 +90,7 @@ Dir.mkdir output_dir if !File.directory?(output_dir) # Run each file through Rocco and write output. sources.each do |filename| rocco = Rocco.new(filename, sources, options) - dest = filename.split('.')[0..-2].join('.') + '.html' + dest = "#{output_dir}/#{filename.scan(/(.*\/)?(.*)\.[^\.]+/)[0][1]}.html" puts "rocco: #{filename} -> #{dest}" File.open(dest, 'wb') { |fd| fd.write(rocco.to_html) } end