#!/bin/bash
-VERSION=2.6.0
+set -e
+
+# version check: https://pngquant.org/
+VERSION=2.12.5
+
cd /tmp
-wget https://github.com/pornel/pngquant/archive/$VERSION.tar.gz
-tar zxf $VERSION.tar.gz
-cd pngquant-$VERSION
-./configure
+git clone -b $VERSION --single-branch https://github.com/pornel/pngquant
+cd pngquant
make && make install
cd /
rm -fr /tmp/pngq*
-rm -fr /tmp/$VERSION*