Created
July 15, 2013 09:39
-
-
Save yuyalush/5998685 to your computer and use it in GitHub Desktop.
pngquantを使って同じディレクトリ内のPNGファイルを圧縮します。
元画像はboforeというディレクトリに保存され、圧縮後のファイルはfix.shと同じ位置に保存されます。
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
pngquant ./*.png | |
mkdir output | |
mv ./*-fs8* ./output | |
cd output | |
for file in *-fs8*; | |
do mv $file `echo $file | sed 's/-fs8//'`; | |
done | |
cd .. | |
mkdir before | |
mv ./*.png before | |
mv ./output/* ./ | |
rmdir output |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment