Skip to content
This repository has been archived by the owner on May 16, 2024. It is now read-only.

Commit

Permalink
[IMP] Add checksum verification for wkhtmltox
Browse files Browse the repository at this point in the history
  • Loading branch information
lasley committed Jun 16, 2017
1 parent 0e925d3 commit 1436c18
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion travis/travis_install_nightly
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,17 @@ fi;

if [ "${WKHTMLTOPDF_VERSION}" != "" ]; then
echo "Install webkit (wkhtmltopdf) patched version ${WKHTMLTOPDF_VERSION}"
(cd ${HOME}/maintainer-quality-tools/travis/ && wget -qO- -t 1 --timeout=240 https://github.com/wkhtmltopdf/wkhtmltopdf/releases/download/${WKHTMLTOPDF_VERSION}/wkhtmltox-${WKHTMLTOPDF_VERSION}_linux-generic-amd64.tar.xz | tar -xJ --strip-components=2 wkhtmltox/bin/wkhtmltopdf)

cd ${HOME}/maintainer-quality-tools/travis/ &&
wkhtmltox=`wget -qO- -t 1 --timeout=240 https://github.com/wkhtmltopdf/wkhtmltopdf/releases/download/${WKHTMLTOPDF_VERSION}/wkhtmltox-${WKHTMLTOPDF_VERSION}_linux-generic-amd64.tar.xz` &&
sha256sum=`wget -qO- -t 1 --timeout=240 https://github.com/wkhtmltopdf/wkhtmltopdf/releases/download/${WKHTMLTOPDF_VERSION}/SHA256SUMS`

if [ `echo -n "${wkhtmltox}" | sha256sum` != $sha256sum ]; then
echo "SHA256 Checksum mismatch for wkhtmltopdf - skipping install"
else
echo -n "${wkhtmltox}" | tar -xJ --strip-components=2 wkhtmltox/bin/wkhtmltopdf
fi

fi;

# Expected directory structure:
Expand Down

0 comments on commit 1436c18

Please sign in to comment.