head	1.4;
access;
symbols
	RELEASE_8_1_0:1.3
	RELEASE_7_3_0:1.3
	RELEASE_8_0_0:1.3
	RELEASE_7_2_0:1.3
	RELEASE_7_1_0:1.3
	RELEASE_6_4_0:1.3
	RELEASE_5_EOL:1.3
	RELEASE_7_0_0:1.3
	RELEASE_6_3_0:1.3
	PRE_XORG_7:1.3
	RELEASE_4_EOL:1.2
	RELEASE_6_2_0:1.1;
locks; strict;
comment	@# @;


1.4
date	2010.11.08.10.08.46;	author garga;	state dead;
branches;
next	1.3;

1.3
date	2007.04.18.17.18.41;	author rafan;	state Exp;
branches;
next	1.2;

1.2
date	2006.11.03.14.25.24;	author jeh;	state Exp;
branches;
next	1.1;

1.1
date	2006.05.09.12.08.51;	author jeh;	state Exp;
branches;
next	;


desc
@@


1.4
log
@Remove expired ports:

2010-11-07 devel/libisc: Unlikely to be used...
2010-11-08 emulators/vmware-guestd3: Depends of misc/compat3x, that is deprecated and set to be removed
2010-11-08 emulators/vmware-tools3: Depends of misc/compat3x, that is deprecated and set to be removed
2010-10-08 misc/compat3x: "Only FreeBSD 6.4+ are supported in ports"
2010-11-08 misc/bidwatcher: Obsoleted by JBidwatcher and changes at http://ebay.com
2010-11-08 security/vscan: Depends of misc/compat3x, that is deprecated and set to be removed
2010-11-08 www/ssserver: Depends of misc/compat3x, that is deprecated and set to be removed
@
text
@#!/bin/sh
#
# $Id$
#
cd @@PREFIX@@/libexec/uvscan/

# Force a low default and then get the current version's value
cur_AVVER="1"
if [ -f pkgdesc.ini ]; then
	cur_AVVER=`grep Version pkgdesc.ini | cut -f2 -d= |sed -e 's/^(\([45][0-9]+\)).*$/\1/'`
fi

# Find what the website has for the current version
fetch -q http://download.nai.com/products/datfiles/4.x/nai/update.ini || exit 1
AVVER="`grep DATVersion update.ini | head -1 | cut -f2 -d= | sed -e 's/^\([45][0-9]*\).$/\1/'`"
rm -f update.ini

# Check to make sure the requested version is "newer" then the current
if [ "$cur_AVVER" -lt "$AVVER" ]; then
	for i in *.tar ; do
		[ -f "$i" ] && mv $i $i.old
	done
	fetch -q http://download.nai.com/products/datfiles/4.x/nai/dat-$AVVER.tar || exit 1
	for i in *.dat ; do
		[ -f "$i" ] && cp -p $i $i.bak
	done
	tar xf dat-$AVVER.tar || exit 1
	rm -f *.old
	echo "`date` Successfully updated AntiVirus DAT files to $AVVER"
fi
exit 0
@


1.3
log
@- Fix problem with fetching newer dat files (>= 5000)
- Replace deprecated variable

PR:		ports/111417
Submitted by:	Larry Rosenman <ler at lerctr.org>
@
text
@@


1.2
log
@Fix update_dat so it won't repeatedly fetch the same DAT file

PR:	105114
@
text
@d10 1
a10 1
	cur_AVVER=`grep Version pkgdesc.ini | cut -f2 -d= |sed -e 's/^(\(4[0-9]+\)).*$/\1/'`
d15 1
a15 1
AVVER="`grep DATVersion update.ini | head -1 | cut -f2 -d= | sed -e 's/^\(4[0-9]*\).$/\1/'`"
@


1.1
log
@Since the DAT files are so short lived on the server, have this port
automatically fetch the current DAT file.  The uvscan-dat port will
be removed shortly.
@
text
@d9 2
a10 2
if [ -f "file_id.diz" ]; then
	cur_AVVER="`tail -1 file_id.diz | sed -e 's/^(\(4[0-9]*\)).*$/\1/'`"
@

