Files
libpng/move_best
2013-03-06 14:08:29 -06:00

19 lines
409 B
Bash
Executable File

#!/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