mirror of
https://git.code.sf.net/p/libpng/code.git
synced 2025-07-10 18:04:09 +02:00
21 lines
415 B
Bash
Executable File
21 lines
415 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)
|
|
|
|
# Selects the smaller of file.zdat (extracted from a PNG) or
|
|
# file.idat.zlib (same but recompressed with zopfli)
|
|
|
|
# picksmaller *.zdat
|
|
|
|
for file in $*
|
|
do
|
|
file1=$1
|
|
file2=`echo $file1 | sed -e "s/zdat/idat.zlib/"`
|
|
shift
|
|
|
|
ls -S $file1 $file2 | tail -1
|
|
|
|
done
|