diff --git a/install-optipng.sh b/install-optipng.sh index de7b6b2..d1db30c 100644 --- a/install-optipng.sh +++ b/install-optipng.sh @@ -1,14 +1,21 @@ #!/bin/bash +# install prerequisites sudo apt-get install build-essential libpng-dev -y +# go into /usr/local/src and remove previous optipng folder/archive cd /usr/local/src rm -rf optipng* +# get the latest optipng release link OPTIPNGLATEST=$(wget http://optipng.sourceforge.net/ -O - | grep tar.gz | awk -F "[\"]" '{print $4}') + +# download and extract optipng wget $OPTIPNGLATEST -O optipng.tar.gz tar -xf optipng.tar.gz cd optipng-* + +# configure and compile optipng ./configure --prefix=/usr make -j "$(nproc)" sudo make install \ No newline at end of file diff --git a/install-webp.sh b/install-webp.sh index 01ff576..78666f7 100644 --- a/install-webp.sh +++ b/install-webp.sh @@ -1,13 +1,18 @@ #!/bin/bash +# install prerequisites sudo apt-get install build-essential libjpeg-dev libpng-dev libtiff-dev libgif-dev libwebp-dev -y +# go into /usr/local/src and remove previous libwebp folder/archive cd /usr/local/src || exit rm -rf libwebp* +# download and extract latest libwebp sources wget https://storage.googleapis.com/downloads.webmproject.org/releases/webp/libwebp-1.0.0.tar.gz -O libwebp.tar.gz tar xvzf libwebp.tar.gz cd libwebp-* || exit + +# configure libwebp and launch compilation ./configure make -j "$(nproc)" sudo make install \ No newline at end of file