标签:
#!/bin/bash function walk() { for file in `ls $1` do local path=$1"/"$file if [ -d $path ] then #echo "DIR $path" walk $path else local fv=${file##*.} local fb="png" if [ "$fv"x = "$fb"x ] then "~/"pngquant -f --ext .png --quality 80-80 $path echo $file fi fi done } if [ $# -ne 1 ] then echo "USAGE: $0 TOP_DIR" else walk $1 fi
改了一个shell 把APP里的全部png用 pngquant压缩一下
标签:
原文地址:http://my.oschina.net/ahuaahua/blog/531731