slitaz-forge annotate 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
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 (2018-10-08) |
parents | |
children |
rev | line source |
---|---|
al@618 | 1 #!/bin/sh |
al@618 | 2 |
al@618 | 3 IFS=$'\n' |
al@618 | 4 |
al@618 | 5 old_size=$(find . -type f -name '*.png' -exec ls -l \{\} \; | awk '{sum += $5}END{print sum}') |
al@618 | 6 |
al@618 | 7 for png in $(find . -type f -name '*.png'); do |
al@618 | 8 pngquant --speed 1 --skip-if-larger --ext .png --force "$png" |
al@618 | 9 optipng -strip all -o7 -zm1-9 "$png" |
al@618 | 10 done |
al@618 | 11 |
al@618 | 12 new_size=$(find . -type f -name '*.png' -exec ls -l \{\} \; | awk '{sum += $5}END{print sum}') |
al@618 | 13 |
al@618 | 14 echo "Finished: $old_size -> $new_size" |