# HG changeset patch # User mas90 # Date 1233767284 0 # Wed Feb 04 17:08:04 2009 +0000 # Node ID 985b950c66bd642a4669d28e10dfaf59759fd810 # Parent 62876a58cbcf3e51c037abb8b6b74d00c8fdf9e0 Avoid repetition of live database name (thanks to Tony Finch once again) diff --git a/fetch-sanesecurity-sigs b/fetch-sanesecurity-sigs --- a/fetch-sanesecurity-sigs +++ b/fetch-sanesecurity-sigs @@ -194,9 +194,10 @@ for db in "$cache_dir"/*.?db "$cache_dir"/*.ftm do db_name=$(basename "$db") + db_live="$db_live" # Only pay any attention to this database if it's newer than the installed version - if [ -e "$clamd_dbdir/sanesecurity-$db_name" -a ! "$db" -nt "$clamd_dbdir/sanesecurity-$db_name" ] + if [ -e "$db_live" -a ! "$db" -nt "$db_live" ] then echo "$db_name is already up-to-date; skipping" continue @@ -233,8 +234,8 @@ fi # Now we can actually install this database - echo "Installing $db_name into $clamd_dbdir/sanesecurity-$db_name" - if rsync -p "$db" "$clamd_dbdir/sanesecurity-$db_name" + echo "Installing $db_name into $db_live" + if rsync -p "$db" "$db_live" then installed=$((installed+1))