Permalink
Browse files

Rewrite loop to remove jpeg comments and exiv data to piped execution.

  • Loading branch information...
1 parent 5b0b89a commit 118adfbe38c02aed153affff0e4c578c2a4b5133 @stefanbeller stefanbeller committed Jan 16, 2013
Showing with 2 additions and 6 deletions.
  1. +2 −6 image_optim.sh
View
@@ -40,12 +40,8 @@ timeend()
TD=`calc $TE - $TS`
}
-for i in $(git ls-files ./ | grep -e "\.jpg$" -e "\.jpeg") ; do
- timestart
- jpegoptim --strip-all $i >> /tmp/mytrimage_jpeg.log
- timeend
- echo $TD $i
-done &
+git ls-files ./ | grep -e "\.jpg$" -e "\.jpeg" | xargs -P 0 -n 1 jpegoptim --strip-all >> /tmp/mytrimage_jpeg.log
+
for i in $(git ls-files ./ | grep "\.png$"); do # png
timestart

0 comments on commit 118adfb

Please sign in to comment.