lib/buildmaster/site/site.rb in BuildMaster-1.0.9 vs lib/buildmaster/site/site.rb in BuildMaster-1.1.9
- old
+ new
@@ -89,18 +89,25 @@
if (item.name == '.svn' || item.name == 'CVS' || item.name == '_svn')
elsif (item.respond_to? 'list')
build_directory(out_dir.dir(item.name), item, template)
elsif (item.respond_to? 'read')
@current_file_name = item
- process_file(item, out_dir, content_dir, item)
- @count = @count + 1
+ if(process_file(item, out_dir, content_dir, item))
+ @count = @count + 1
+ end
end
end
end
def process_file(content_file, out_dir, content_dir, item)
- print ">> #{content_file.path.to_s}\n"
- FileProcessor.new(@template, content_file, @spec).write_to_target
+ processor = FileProcessor.new(@template, content_file, @spec)
+ processed = nil
+ if (processor.out_of_date?)
+ print ">> #{content_file.path.to_s}\n"
+ processor.write_to_target
+ processed = true
+ end
+ processed
end
end
end