summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGlenn Randers-Pehrson <glennrp at users.sourceforge.net>2013-07-16 23:28:05 -0500
committerGlenn Randers-Pehrson <glennrp at users.sourceforge.net>2013-07-16 23:28:05 -0500
commit6e2cbd7c3a5b66095c630990cdd9de81bb451552 (patch)
tree0e45357338a94ea3c501003bc33e91e9d8011ff7
parent3091454eb4fe9099ec571173460c7abc32490156 (diff)
downloadlibpng-6e2cbd7c3a5b66095c630990cdd9de81bb451552.tar.gz
[pngzop] Bump to version 1.0.2; require pngcrush-1.7.66 or later.pngzop-1.0.2
-rwxr-xr-xpngzop13
-rw-r--r--pngzop-1.0.2-README.txt (renamed from pngzop-1.0.1-README.txt)2
2 files changed, 12 insertions, 3 deletions
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
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"