pngcrush: don't print out an error on mv if optimizing fails

pngcrush is currently storing the optimized png in <pngname>.out.
If optimizing the png fails, e.g. on palette errors, mv can't
overwrite the original file with the nonexisting .out file and prints
out an error like this:

mv: cannot stat `./foo/bar/baz.png.out': No such file or directory

Writing stderr to /dev/null will suppress that message.

Change-Id: I0b7339392545e98586d66cc8ff8abf52c443f66f
This commit is contained in:
Reinhard Lenninger 2012-08-26 22:47:49 +02:00
parent ba1ca3309a
commit 4576c753b5
1 changed files with 1 additions and 1 deletions

View File

@ -45,7 +45,7 @@ if [ "$(which pngcrush)" != "" ];
then
optimize_png () {
pngcrush -q ${BRUTECRUSH} $1 ${1}.out 1> /dev/null 2> /dev/null
mv ${1}.out ${1}
mv ${1}.out ${1} 2> /dev/null
}
elif [ "$(which optipng)" != "" ];
then