slitaz-forge annotate pkgs/shrink-icons.sh @ rev 711

Update pangolin
author Pascal Bellard <pascal.bellard@slitaz.org>
date Wed Jan 01 18:26:56 2020 +0100 (3 months ago)
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"