unless -w $opt_a;
}
+my $unzip_check = `which unzip` or die "can't find unzip executable\n";
+
#my $tmpdir = File::Temp->newdir();
my $tmpdir = tempdir( CLEANUP => 1 ); #DIR=>somewhere?
}
#unzip file
- system("unzip -P $password -q $tmpdir/${filename}_resp.zip -d $tmpdir");
+ system('unzip', '-P', '$password', '-q',
+ "$tmpdir/${filename}_resp.zip", '-d', $tmpdir);
if(! -f "$tmpdir/${filename}_resp.xml") {
- warn "failed to extract ${filename}_resp.xml\n";
+ warn "failed to extract ${filename}_resp.xml from ${filename}_resp.zip\n";
next BATCH;
}
my $user = shift or die &usage;
adminsuidsetup $user;
+my $zip_check = `which zip` or die "can't find zip executable\n";
+
my @batches;
if($opt_a) {
print OUT $text;
close OUT;
- system("zip -P $password -q -j $tmpdir/$filename.zip $tmpdir/$filename.xml");
+ system('zip', '-P', '$password', '-q', '-j',
+ "$tmpdir/$filename.zip", "$tmpdir/$filename.xml");
die "failed to create zip file\n" if (! -f "$tmpdir/$filename.zip" );
push @filenames, $filename;