4 use FS::UID qw(adminsuidsetup);
7 my $user = shift or die &usage;
8 my $dir = shift or die &usage;
13 my $conf = new FS::Conf;
15 chdir $dir or die "can't change to $dir: $!\n";
16 die "pmzclfull.zip already exists\n" if -f 'pmzclfull.zip';
18 die "direct download of tax data not enabled\n"
19 unless $conf->exists('taxdatadirectdownload');
20 my ( $urls, $username, $secret, $states ) =
21 $conf->config('taxdatadirectdownload');
22 die "No tax download URL provided. ".
23 "Did you set the taxdatadirectdownload configuration value?\n"
26 my @filelist = qw( code.dbf detail.dbf geocode.dbf npanxx.dbf plus4.dbf
27 txmatrix.dbf zip.dbf );
29 system('zip', "-P", $secret, 'pmzclfull.zip', @filelist) == 0
30 or die "zip failed\n";
33 die "Usage:\n\n reassemble_taxes user dir\n";