Commit 37051cd8 by Arve Knudsen Committed by GitHub

Build: Verify checksums when downloading PhantomJS (#20558)

* Build: Supply curl -f when downloading phantomjs
* Build: Verify checksums of downloaded PhantomJS zips
parent 0a080bef
#!/bin/bash -e
#!/bin/bash
set -eo pipefail
if [ ! -d '/tmp/phantomjs' ]; then
_version="2.1.1"
curl -L https://bitbucket.org/ariya/phantomjs/downloads/phantomjs-$_version-windows.zip > /tmp/phantomjs-win.zip
curl -L https://bitbucket.org/ariya/phantomjs/downloads/phantomjs-$_version-macosx.zip > /tmp/phantomjs-mac.zip
curl -fL https://bitbucket.org/ariya/phantomjs/downloads/phantomjs-$_version-windows.zip -o /tmp/phantomjs-win.zip
[ "$(sha256sum /tmp/phantomjs-win.zip | cut -d' ' -f1)" = \
"d9fb05623d6b26d3654d008eab3adafd1f6350433dfd16138c46161f42c7dcc8" ] || \
(echo "Checksum mismatch phantomjs-$_version-windows.zip"; exit 1)
curl -fL https://bitbucket.org/ariya/phantomjs/downloads/phantomjs-$_version-macosx.zip -o /tmp/phantomjs-mac.zip
[ "$(sha256sum /tmp/phantomjs-mac.zip | cut -d' ' -f1)" = \
"538cf488219ab27e309eafc629e2bcee9976990fe90b1ec334f541779150f8c1" ] || \
(echo "Checksum mismatch phantomjs-$_version-mac.zip"; exit 1)
cd /tmp
unzip /tmp/phantomjs-win.zip
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment