-
-
Save mdjaman/22dac41f3e9214a5f38d5cba335c453e to your computer and use it in GitHub Desktop.
Install wkhtmltopdf
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
_UVERSION=${1:-precise} | |
_WVERSION=0.12.2.1 | |
_WVERSION_M=`echo $_WVERSION | awk -F. '{print $1"."$2}'` | |
FILENAME="wkhtmltox-${_WVERSION}_linux-${_UVERSION}-amd64.deb" | |
URL="http://download.gna.org/wkhtmltopdf/${_WVERSION_M}/${_WVERSION}/${FILENAME}" | |
apt-get update | |
apt-get install -y xvfb xfonts-75dpi | |
mkdir -p /tmp/wkhtml && cd /tmp/wkhtml | |
wget $URL | |
dpkg -i ${FILENAME} && \ | |
cd && rm -rf /tmp/wkhtml | |
exit 0 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment