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:
parent
ba1ca3309a
commit
4576c753b5
|
@ -45,7 +45,7 @@ if [ "$(which pngcrush)" != "" ];
|
||||||
then
|
then
|
||||||
optimize_png () {
|
optimize_png () {
|
||||||
pngcrush -q ${BRUTECRUSH} $1 ${1}.out 1> /dev/null 2> /dev/null
|
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)" != "" ];
|
elif [ "$(which optipng)" != "" ];
|
||||||
then
|
then
|
||||||
|
|
Loading…
Reference in New Issue