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
diff --git a/tools/opticharger b/tools/opticharger
index a3d7ade..0473008 100755
--- a/tools/opticharger
+++ b/tools/opticharger
@@ -45,7 +45,7 @@
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