Skip to content

Commit

Permalink
test_cwebp: add --extra_args
Browse files Browse the repository at this point in the history
allows the passing of arbitrary cwebp arguments

Change-Id: Ie8e0f645de211ba4f40030bc6073ed982ab6ae4a
  • Loading branch information
jzern committed Jun 7, 2014
1 parent 74b415b commit feaae62
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion test_cwebp.sh
Expand Up @@ -23,6 +23,7 @@ Options:
--mt
--noalpha
--lossless
--extra_args=<cwebp args>
EOT
exit 1
}
Expand Down Expand Up @@ -52,6 +53,7 @@ noalpha=""
lossless=""
mt=""
md5exec="md5sum"
extra_args=""

n=1
for opt; do
Expand All @@ -64,6 +66,7 @@ for opt; do
--lossless) lossless="-lossless";;
--noalpha) noalpha="-noalpha";;
--nocheck) check="";;
--extra_args=*) extra_args="${optval}";;
-*) usage;;
*) break;;
esac
Expand All @@ -75,7 +78,7 @@ done

executable=${executable:-cwebp}
${executable} 2>/dev/null | grep -q Usage || usage
executable="${executable} -quiet ${mt} ${lossless} ${noalpha}"
executable="${executable} -quiet ${mt} ${lossless} ${noalpha} ${extra_args}"
set +e

if [ "$check" = "true" ]; then
Expand Down

0 comments on commit feaae62

Please sign in to comment.