Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

correct log file.

  • Loading branch information...
commit 3ff7184b1d51859f654454990ea81af32e8e6668 1 parent b625eef
@stefanbeller authored
Showing with 5 additions and 3 deletions.
  1. +5 −3 image_optim.sh
View
8 image_optim.sh
@@ -66,10 +66,12 @@ png_optimize_all()
{
timestart
print "starting to optimize pngs"
- git ls-files ./ | grep "\.png$" | xargs -P ${cpucores} -n 1 optipng -zc1-9 -zm1-9 -zs0-3 -f0-5 >> /tmp/mytrimage_png.log
- git ls-files ./ | grep "\.png$" | xargs -P ${cpucores} -n 1 advpng -z4 >> /tmp/mytrimage_png.log
- git ls-files ./ | grep "\.png$" | xargs -P ${cpucores} -n 1 -I '{}' pngcrush -rem gAMA -rem alla -rem cHRM -rem iCCP -rem sRGB -rem time {} {}.foo >> /tmp/mytrimage_png.log
+ git ls-files ./ | grep "\.png$" | xargs -P ${cpucores} -n 1 optipng -zc1-9 -zm1-9 -zs0-3 -f0-5 >> /tmp/image_optim_png.log
+ git ls-files ./ | grep "\.png$" | xargs -P ${cpucores} -n 1 advpng -z4 >> /tmp/image_optim_png.log
+ git ls-files ./ | grep "\.png$" | xargs -P ${cpucores} -n 1 -I '{}' pngcrush -rem gAMA -rem alla -rem cHRM -rem iCCP -rem sRGB -rem time {} {}.foo >> /tmp/image_optim_png.log
+ # deciding for which file to use is easy for cpu,
+ # waiting for i/o, no need to parallelize it.
for i in $(git ls-files ./ | grep "\.png$") ; do
if [[ `du -b $i | awk '{print $1}'` -gt `du -b $i.foo | awk '{print $1}'` ]] ; then
mv $i.foo $i

0 comments on commit 3ff7184

Please sign in to comment.
Something went wrong with that request. Please try again.