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

View file

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