From c34ec3e38257eddf8914610b4e126d25804d8b8a Mon Sep 17 00:00:00 2001 From: Andros Fenollosa Date: Mon, 8 Oct 2018 01:09:27 +0200 Subject: [PATCH] First commit --- mozjpeg-installer.sh | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100755 mozjpeg-installer.sh diff --git a/mozjpeg-installer.sh b/mozjpeg-installer.sh new file mode 100755 index 0000000..7edb9eb --- /dev/null +++ b/mozjpeg-installer.sh @@ -0,0 +1,27 @@ +#!/bin/bash +set -e + +# Tools install +sudo apt-get install -y autoconf automake libtool nasm make pkg-config git + +# Get code +git clone https://github.com/mozilla/mozjpeg.git --depth 1 + +# Build +cd mozjpeg +autoreconf -fiv +./configure +make -j8 + +# Install +sudo make install + +# Path +sudo ln -s /opt/mozjpeg/bin/jpegtran /usr/bin/mozjpeg + +# Remove old files +cd .. +sudo rm -r mozjpeg + +# Alert +echo 'Finish! Try "mozjpeg --help"'