From ac7908e8151176b2a02daf7d9e3ed6d0ffd6bf3c Mon Sep 17 00:00:00 2001 From: Andrew Brown Date: Tue, 28 Sep 2010 22:35:13 -0400 Subject: [PATCH] readme update with parallel pngcrush recipe --- README.rst | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/README.rst b/README.rst index 007de92..26a9498 100644 --- a/README.rst +++ b/README.rst @@ -209,6 +209,10 @@ render for my world from 85M to 67M. find /path/to/destination -name "*.png" -exec pngcrush {} {}.crush \; -exec mv {}.crush {} \; +Or if you prefer a more parallel solution, try something like this:: + + find /path/to/destination -print0 | xargs -0 -n 1 -P sh -c 'pngcrush $0 temp.$$ && mv temp.$$ $0' + If you're on Windows, I've gotten word that this command line snippet works provided pngout is installed and on your path. Note that the % symbols will need to be doubled up if this is in a batch file.