Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

correct log file.

  • Loading branch information...
commit 3ff7184b1d51859f654454990ea81af32e8e6668 1 parent b625eef
stefanbeller authored

Showing 1 changed file with 5 additions and 3 deletions. Show diff stats Hide diff stats

  1. +5 3 image_optim.sh
8 image_optim.sh
@@ -66,10 +66,12 @@ png_optimize_all()
66 66 {
67 67 timestart
68 68 print "starting to optimize pngs"
69   - git ls-files ./ | grep "\.png$" | xargs -P ${cpucores} -n 1 optipng -zc1-9 -zm1-9 -zs0-3 -f0-5 >> /tmp/mytrimage_png.log
70   - git ls-files ./ | grep "\.png$" | xargs -P ${cpucores} -n 1 advpng -z4 >> /tmp/mytrimage_png.log
71   - 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
  69 + git ls-files ./ | grep "\.png$" | xargs -P ${cpucores} -n 1 optipng -zc1-9 -zm1-9 -zs0-3 -f0-5 >> /tmp/image_optim_png.log
  70 + git ls-files ./ | grep "\.png$" | xargs -P ${cpucores} -n 1 advpng -z4 >> /tmp/image_optim_png.log
  71 + 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
72 72
  73 + # deciding for which file to use is easy for cpu,
  74 + # waiting for i/o, no need to parallelize it.
73 75 for i in $(git ls-files ./ | grep "\.png$") ; do
74 76 if [[ `du -b $i | awk '{print $1}'` -gt `du -b $i.foo | awk '{print $1}'` ]] ; then
75 77 mv $i.foo $i

0 comments on commit 3ff7184

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