33 lines
821 B
Bash
33 lines
821 B
Bash
#!/bin/bash
|
|
|
|
|
|
# Tue Jan 14 15:33:40 CET 2014 - draht
|
|
#
|
|
# remark:
|
|
#
|
|
# This update shell script doesn't really make sense as part of
|
|
# the source of a package that doesn't have network access during
|
|
# its build. In fact, %build is empty.
|
|
#
|
|
# However, now that the script is right in front of you, you can
|
|
# use it to update the tar file with the virus database from your
|
|
# host system, and change the version string in the spec file to
|
|
# the current date.
|
|
# Convenience...
|
|
|
|
C_DB=clamav-database.tar.bz2
|
|
SPEC=$( echo *.spec)
|
|
if [ ! -x "`which freshclam`" ]; then
|
|
echo "You need the package clamav or clamav-nodb installed on your system for the update
|
|
of the clamav malware database using the freshclam tool to be able to work.
|
|
|
|
Fatal, exit."
|
|
exit 11
|
|
fi
|
|
|
|
freshclam
|
|
(
|
|
cd /
|
|
tar cfvv - var/lib/clamav
|
|
) | bzip2 -c9 > $C_DB
|