Skip to content

Instantly share code, notes, and snippets.

@oldj
Created November 23, 2016 02:48
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save oldj/287ed0c5a41a5a95942dc79111a5360b to your computer and use it in GitHub Desktop.
Save oldj/287ed0c5a41a5a95942dc79111a5360b to your computer and use it in GitHub Desktop.
#!/usr/bin/env bash
f=type_tmp
if [ ! -d ${f} ]
then
mkdir ${f}
fi
cd ${f}
if [ ! -f wkhtmltopdf ]
then
curl -O http://120.26.200.17:8080/misc/wkhtmltopdf.zip
unzip wkhtmltopdf.zip
fi
if [ ! -f t.html ]
then
touch t.html
fi
./wkhtmltopdf file://$(pwd)/t.html t.pdf
echo "Done!"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment