X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;ds=sidebyside;f=rt%2Ftools%2Ftestdeps;fp=rt%2Ftools%2Ftestdeps;h=ddc338107db83e607df6bd1e8586ce96cdce3ecd;hb=3ef62a0570055da710328937e7f65dbb2c027c62;hp=0000000000000000000000000000000000000000;hpb=030438c9cb1c12ccb79130979ef0922097b4311a;p=freeside.git diff --git a/rt/tools/testdeps b/rt/tools/testdeps new file mode 100644 index 000000000..ddc338107 --- /dev/null +++ b/rt/tools/testdeps @@ -0,0 +1,115 @@ +#!/usr/bin/perl -w + +# $Header: /home/cvs/cvsroot/freeside/rt/tools/Attic/testdeps,v 1.1 2002-08-12 06:17:08 ivan Exp $ + +# Copyright 2000 Jesse Vincent +# Distributed under the GNU General Public License +# + +# +# This is just a basic script that checks to make sure that all +# the modules needed by RT before you can install it. +# + +use strict; + +use vars qw($mode $dbd $module @modules); + +$mode = shift || print_help(); +$dbd = shift || print_help(); + +@modules = qw( +Digest::MD5 +Storable +DBI 1.18 +DBIx::DataSource 0.02 +DBIx::SearchBuilder 0.48 +HTML::Entities +MLDBM +Net::Domain +Net::SMTP +Params::Validate 0.02 +HTML::Mason 1.02 +CGI::Cookie 1.20 +Apache::Cookie +Apache::Session 1.53 +Date::Parse +Date::Format +MIME::Entity 5.108 +Mail::Mailer 1.20 +Getopt::Long 2.24 +Tie::IxHash +Text::Wrapper +Text::Template +File::Spec 0.8 +Errno +FreezeThaw +File::Temp +Log::Dispatch 1.6 +); + + +if ($dbd =~ /mysql/i) { + push @modules, ('DBD::mysql','2.0416'); +} +elsif ($dbd =~ /oracle/i) { + push @modules, ('DBD::Oracle',''); +} +elsif ($dbd =~ /pg/i) { + push @modules, ('DBD::Pg',''); +} +use CPAN; + +while ($module= shift @modules) { + my $version = ""; + $version = " ". shift (@modules) . " " if ($modules[0] =~ /^([\d\.]*)$/); + print "Checking for $module$version"; + eval "use $module$version" ; + if ($@) { + &resolve_dependency($module, $version) + } + else { + print "...found\n"; + } +} + +sub print_help { +print <