Replace md5sum --quiet with --status, more portable.

This commit is contained in:
Benoît S. 2015-03-12 15:27:38 +01:00
parent 7c0d965652
commit d23e978ecc
1 changed files with 2 additions and 1 deletions

View File

@ -13,6 +13,7 @@ find="ionice -c3 find -O3"
grep="nice -n 19 grep"
wc="nice -n 19 wc"
wget="wget -q -t 3"
md5sum="md5sum --status -c"
# Various.
fileslist=$(mktemp)
tmpPATH=/tmp/evomalware.tmp
@ -41,7 +42,7 @@ cd $tmpPATH
for file in evomalware.filenames evomalware.patterns evomalware.whitelist evomalware.suspect; do
$wget ${databaseURL}/${file}
$wget ${databaseURL}/${file}.md5
if md5sum --quiet -c ${file}.md5; then
if $md5sum ${file}.md5; then
cp $file ${databasePATH}/
else
echo "Error with ${databaseURL}/${file}, wrong md5sum!"