diff --git a/move_best b/move_best new file mode 100755 index 000000000..c31480d4e --- /dev/null +++ b/move_best @@ -0,0 +1,18 @@ +#!/bin/sh + +# For use in the pngzop project +# Copyright 2013 by Glenn Randers-Pehrson +# Released under the pngcrush license (equivalent to the libpng license) + +# Usage: +# move_best *.zdat +# assumes that for each *.zdat, *.idat.zlib exists +# +# moves the smaller of root.zdat or root.idat.zlib +# to root.best + +for file in $* +do +root=`echo $file | sed -e "s/.zdat$//"` +cp `picksmaller $root.zdat` $root.best +done diff --git a/picksmaller b/picksmaller index 3c73a446b..d46fc2092 100755 --- a/picksmaller +++ b/picksmaller @@ -7,7 +7,7 @@ # Selects the smaller of file.zdat (extracted from a PNG) or # file.idat.zlib (same but recompressed with zopfli) -# picksmall file1 file2 +# picksmaller file1 file2 for file in $* do