slitaz-forge view pkgs/shrink-icons.sh @ rev 697

mirror: remove Swiss academia mirror
See: http://forum.slitaz.org/topic/who-is-responsible-for-the-mirror-list-on-httpslitazorgenget
author Aleksej Bobylev <al.bobylev@gmail.com>
date Mon Oct 08 23:27:48 2018 +0300 (7 months ago)
parents
children
line source
1 #!/bin/sh
3 IFS=$'\n'
5 old_size=$(find . -type f -name '*.png' -exec ls -l \{\} \; | awk '{sum += $5}END{print sum}')
7 for png in $(find . -type f -name '*.png'); do
8 pngquant --speed 1 --skip-if-larger --ext .png --force "$png"
9 optipng -strip all -o7 -zm1-9 "$png"
10 done
12 new_size=$(find . -type f -name '*.png' -exec ls -l \{\} \; | awk '{sum += $5}END{print sum}')
14 echo "Finished: $old_size -> $new_size"