From 6e2cbd7c3a5b66095c630990cdd9de81bb451552 Mon Sep 17 00:00:00 2001 From: Glenn Randers-Pehrson Date: Tue, 16 Jul 2013 23:28:05 -0500 Subject: [PATCH] [pngzop] Bump to version 1.0.2; require pngcrush-1.7.66 or later. --- pngzop | 13 +++++++++++-- pngzop-1.0.1-README.txt => pngzop-1.0.2-README.txt | 2 +- 2 files changed, 12 insertions(+), 3 deletions(-) rename pngzop-1.0.1-README.txt => pngzop-1.0.2-README.txt (97%) diff --git a/pngzop b/pngzop index 2a6a1f3a2..29315b495 100755 --- a/pngzop +++ b/pngzop @@ -1,6 +1,6 @@ #!/bin/sh -# pngzop +# pngzop version 1.0.2 # Copyright 2013 by Glenn Randers-Pehrson # Released under the pngcrush license (which is equivalent to the zlib @@ -10,7 +10,7 @@ # recompresses them with zopfli, and embeds them in a new set of PNG files # with suffix ".png" replaced (by default) with "_pngzop.png" -# Requires zopfli, pngcrush (version 1.7.65 or later), zpipe (from the +# Requires zopfli, pngcrush (version 1.7.66 or later), zpipe (from the # zlib-1.2.7 or later distribution, in the "examples" directory), pngfix # (from the libpng-1.6.3 or later distribution), and "mkdir -p", # along with these programs that should have been installed along with @@ -28,6 +28,15 @@ # Input: *.png # Output: *_pngzop.png +# Check pngcrush version +PCMIN=1766 +PCVER=`pngcrush 2>&1 | head -2 | tail -1 | sed -e "s/.* //"` +PCTEST=`echo $PCVER | sed -e "s/\.//g"` +if [ $PCTEST -lt $PCMIN ] ; then + echo Pngcrush version is $PCVER but version 1.7.66 or later is required. + exit +fi + # Get temporary directory; use TMPDIR if defined, otherwise /tmp case x${TMPDIR} in x) diff --git a/pngzop-1.0.1-README.txt b/pngzop-1.0.2-README.txt similarity index 97% rename from pngzop-1.0.1-README.txt rename to pngzop-1.0.2-README.txt index 9955b9085..2c3d425b1 100644 --- a/pngzop-1.0.1-README.txt +++ b/pngzop-1.0.2-README.txt @@ -34,7 +34,7 @@ 6. Postprocesses the PNG file with "pngfix" to optimize the windowBits field, to minimize memory use during later decompression. - Pngzop requires zopfli, pngcrush (version 1.7.65 or later), zpipe (from + Pngzop requires zopfli, pngcrush (version 1.7.66 or later), zpipe (from the "examples" directory of the zlib-1.2.7 or later distribution), pngfix (from the libpng-1.6.3 or later distribution), and "mkdir -p", along with these programs that should have been installed from their "C"