#!/usr/bin/perl -w
-# $Id: rebuild.in,v 1.9 2003/05/25 13:13:18 cjwatson Exp $
+# $Id: rebuild.in,v 1.13 2003/08/23 15:12:57 cjwatson Exp $
# Load modules and set environment
use File::Copy;
require("$config_path/config");
require("$lib_path/errorlib");
+use vars qw($gSpoolDir);
+
$ENV{'PATH'} = $lib_path.':'.$ENV{'PATH'};
chdir("$gSpoolDir") || die "chdir spool: $!\n";
$debug = 0;
@ARGV==0 and &quit( "no archive given on the commandline" );
-$archive= shift(@ARGV);
-open IDXFILE, "> index.$archive" or &quit( "trying to reset index file: $!" );
+my $archive = shift(@ARGV);
+my $index = "index.$archive";
+$index = 'index.db' if $archive eq 'db-h';
+open IDXFILE, "> $index" or &quit( "trying to reset index file: $!" );
#get list of bugs (ie, status files)
my @files;
{
my $path = sprintf( "$archive/%.2d", $subdir );
opendir(DIR,$path) || next;
- my @list= grep(m/^\d+\.status$/,readdir(DIR));
+ my @list= grep(m/^\d+\.summary$/,readdir(DIR));
closedir DIR;
- grep(s/\.status$//,@list);
+ grep(s/\.summary$//,@list);
push @files, @list;
}