https://bugs.webkit.org/show_bug.cgi?id=177021
Reviewed by Tim Horton.
* generate-unified-source-bundles.rb:
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@222110
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
+2017-09-15 Keith Miller <keith_miller@apple.com>
+
+ generate-unified-source-bundles.rb shouldn't write a file that isn't going to change
+ https://bugs.webkit.org/show_bug.cgi?id=177021
+
+ Reviewed by Tim Horton.
+
+ * generate-unified-source-bundles.rb:
+
2017-09-14 Saam Barati <sbarati@apple.com>
We should have a way of preventing a caller from making a tail call and we should use it for ProxyObject instead of using build flags
@bundleCount += 1
bundleFile = "UnifiedSource#{@bundleCount}#{extension}"
bundleFile = $derivedSourcesPath + bundleFile
- log("writing bundle #{bundleFile} with: \n#{@currentBundleText}")
- IO::write(bundleFile, @currentBundleText)
$generatedSources << bundleFile
+ if (!bundleFile.exist? || IO::read(bundleFile) != @currentBundleText)
+ log("writing bundle #{bundleFile} with: \n#{@currentBundleText}")
+ IO::write(bundleFile, @currentBundleText)
+ end
+
@currentBundleText = ""
@fileCount = 0
end