]> git.saurik.com Git - apple/javascriptcore.git/blobdiff - offlineasm/self_hash.rb
JavaScriptCore-7600.1.4.16.1.tar.gz
[apple/javascriptcore.git] / offlineasm / self_hash.rb
index b91057391e85885312a817e8ad29989506100bb1..6c736ff5bfc9f219ccce21c51aa04fdfb7ccb7bf 100644 (file)
@@ -44,6 +44,21 @@ def dirHash(directory, regexp)
     return Digest::SHA1.hexdigest(contents)
 end
 
+#
+# fileListHash(fileList) -> SHA1 hexdigest
+#
+# Returns a hash of all files in the list.
+#
+
+def fileListHash(fileList)
+    contents = ""
+    fileList.each {
+        | fileName |
+        contents += IO::read(fileName)
+    }
+    return Digest::SHA1.hexdigest(contents)
+end
+
 #
 # selfHash -> SHA1 hexdigest
 #