# HG changeset patch # User Anton Shestakov <av6@dwimlabs.net> # Date 1470763194 -28800 # Node ID 05fdc9e2fb0fd95e750299d2000148897c4187d2 # Parent 4b03f725cb6999f82dafe4fac2d8363699a4112d updatesri: this is bash, use $() instead of `` diff -r 4b03f725cb69 -r 05fdc9e2fb0f contrib/updatesri.sh --- a/contrib/updatesri.sh Thu Jul 07 00:12:35 2016 +0800 +++ b/contrib/updatesri.sh Wed Aug 10 01:19:54 2016 +0800 @@ -3,11 +3,11 @@ set -euo pipefail egrep -oh 'https://[^"]+\.js' "$@" | sort -u | while read url; do - hash=`curl -fsS "$url" | openssl dgst -sha384 -binary | openssl base64 -A` + hash=$(curl -fsS "$url" | openssl dgst -sha384 -binary | openssl base64 -A) sed -i "\|$url| c\\ <script src=\"$url\" integrity=\"sha384-$hash\" crossorigin=\"anonymous\"></script>" "$@" done egrep -oh 'https://[^"]+\.css' "$@" | sort -u | while read url; do - hash=`curl -fsS "$url" | openssl dgst -sha384 -binary | openssl base64 -A` + 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\">" "$@" done