--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/contrib/updatesri.sh Wed May 25 21:04:11 2016 +0800
+egrep -oh 'https://[^"]+\.js' "$@" | sort -u | while read url; do
+ hash=`curl -fsS "$url" | openssl dgst -sha384 -binary | openssl base64 -A`
+ sed -i "\|$url| c\\ <script src=\"$url\" integrity=\"sha384-$hash\" crossorigin=\"anonymous\"></script>" "$@"
+egrep -oh 'https://[^"]+\.css' "$@" | sort -u | while read url; do
+ hash=`curl -fsS "$url" | openssl dgst -sha384 -binary | openssl base64 -A`
+ sed -i "\|$url| c\\ <link rel=\"stylesheet\" href=\"$url\" integrity=\"sha384-$hash\" crossorigin=\"anonymous\">" "$@"