Skip to content
Snippets Groups Projects
Commit 1871f43a authored by Christopher Schäpers's avatar Christopher Schäpers
Browse files

Add shellscript for optimization.

parent 448a3904
No related branches found
No related tags found
No related merge requests found
#!/bin/bash
function recursive_optimize_images() {
cd $1;
optipng -o6 *.png;
jpegoptim --strip-all *.jpg;
for svg in `ls *.svg`;
do
mv $svg $svg.opttmp;
scour -i $svg.opttmp -o $svg --create-groups --enable-id-stripping --enable-comment-stripping --shorten-ids --remove-metadata;
done;
rm *.opttmp
for dir in `ls -d */`;
do
recursive_optimize_images $dir;
cd ..;
done;
}
recursive_optimize_images ../../
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment