Pamhyr2/packages/clamav-scan.sh

17 lines
318 B
Bash
Executable File

#! /bin/bash
set +x
OPTS="-r -a"
FILES="../windows/pamhyr-windows.exe ../windows/pamhyr-windows.zip ../linux/pamhyr-gnulinux.tar.xz"
clamscan $OPTS $FILES | tee clamav.log
RES=$(cat clamav.log | grep "Infected files: 0")
if [ -z "$RES" ]; then
echo "Infected files"
exit -1
else
echo "OK"
exit 0
fi