def writeRegeneratedFile(outFile, makeBackup, checkNoChanges)
      puts "writeRegeneratedFile, #{outFile}, makeBackup = #{makeBackup}, checkNoChanges = #{checkNoChanges}"
      if makeBackup
        backupFileName = makeBackupFile(outFile)
      end
      File.open(outFile, "w") do |f|
        for component in @components do
          f.write(component.output)
        end
      end
      puts " wrote regenerated page to #{outFile}"
      if checkNoChanges
        if !makeBackup
          raise Exception.new("writeRegeneratedFile #{outFile}: checkNoChanges specified, but no backup was made")
        end
        checkAndEnsureOutputFileUnchanged(outFile, backupFileName)
      end
    end
def writeRegeneratedFile(outFile, makeBackup, checkNoChanges)
      puts "writeRegeneratedFile, #{outFile}, makeBackup = #{makeBackup}, checkNoChanges = #{checkNoChanges}"
      if makeBackup
        backupFileName = makeBackupFile(outFile)
      end
      File.open(outFile, "w") do |f|
        for component in @components do
          f.write(component.output)
        end
      end
      puts " wrote regenerated page to #{outFile}"
      if checkNoChanges
        if !makeBackup
          raise Exception.new("writeRegeneratedFile #{outFile}: checkNoChanges specified, but no backup was made")
        end
        checkAndEnsureOutputFileUnchanged(outFile, backupFileName)
      end
    end
Write the output of the page components to the output file (optionally checking that
 there are no differences between the new output and the existing output.