#!/usr/bin/perl require './tomcat-lib.pl'; use File::Basename; use File::Path 'rmtree'; sub inst_error{ print "$main::whatfailed : $_[0]
\n";
&ui_print_footer("", $text{'index_return'});
exit;
}
if($ENV{'CONTENT_TYPE'} =~ /boundary=(.*)$/) {
&ReadParseMime();
}else {
&ReadParse();
$no_upload = 1;
}
$| = 1;
&ui_print_header(undef, $text{'libs_install_title'}, "");
my $lib_file = process_file_source();
my @suffixlist = ('\.zip', '\.jar');
($lib_name,$path,$lib_suffix) = fileparse($lib_file,@suffixlist);
my $unzip_dir = '';
my @lib_jars;
#Check if its a .zip or .jar
print "Source: $lib_file
";
if($lib_suffix eq ".zip"){
$unzip_dir = unzip_file($lib_file);
#make a list of extension jars
opendir(DIR, $unzip_dir) or die $!;
@lib_jars = grep { $_ = $unzip_dir.'/'.$_ ; -f && /\.jar$/ } readdir(DIR);
closedir(DIR);
}elsif($lib_suffix eq ".jar"){
push(@lib_jars, $lib_file);
}else{
&error("Error: Unsupported file type $lib_suffix");
&ui_print_footer("", $text{'index_return'});
}
print "