Created
May 15, 2018 12:18
-
-
Save Spir/6198f89f385c63008e583e4f33377cd0 to your computer and use it in GitHub Desktop.
jpegoptim & optipng recursive optimization
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
#!/bin/bash | |
cd ~/public/; | |
optimize() { | |
jpegoptim *.jpg --max=90 --strip-all --preserve --totals | |
optipng *.png; | |
for i in * | |
do | |
if test -d $i | |
then | |
cd $i | |
echo $i | |
optimize | |
cd .. | |
fi | |
done | |
echo | |
} | |
optimize |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment