From 4576c753b528e1a4d11a15dd5baa329400085023 Mon Sep 17 00:00:00 2001 From: Reinhard Lenninger Date: Sun, 26 Aug 2012 22:47:49 +0200 Subject: [PATCH] pngcrush: don't print out an error on mv if optimizing fails pngcrush is currently storing the optimized png in .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 --- tools/opticharger | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/opticharger b/tools/opticharger index a3d7adee..04730086 100755 --- a/tools/opticharger +++ b/tools/opticharger @@ -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