Subversion Repositories camp_sysinfo_client_3

Rev

Rev 96 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 96 Rev 98
Line 198... Line 198...
198
                             'debian' => 'apt-get -y install libwww-perl',
198
                             'debian' => 'apt-get -y install libwww-perl',
199
                             'freebsd' => 'pkg install -y p5-libwww'
199
                             'freebsd' => 'pkg install -y p5-libwww'
200
                           },
200
                           },
201
                  'YAML::Tiny' => {
201
                  'YAML::Tiny' => {
202
                              'debian' => 'apt-get -y install libyaml-tiny-perl',
202
                              'debian' => 'apt-get -y install libyaml-tiny-perl',
203
                              'freebsd' => 'unzip Tiny.pm.gz ; mkdir YAML ; mv Tiny.pm YAML'
203
                              'freebsd' => 'gunzip Tiny.pm.gz ; mkdir YAML ; mv Tiny.pm YAML'
204
                           },
204
                           },
205
                );
205
                );
206
 
206
 
207
# utilities md5sum
207
# utilities md5sum
208
# freebsd isomd5sum
208
# freebsd isomd5sum
Line 214... Line 214...
214
sub validateLibraries {
214
sub validateLibraries {
215
   my ( $libraries, $os ) = @_;
215
   my ( $libraries, $os ) = @_;
216
   my @command;
216
   my @command;
217
   my @missingLibs;
217
   my @missingLibs;
218
   foreach my $lib ( keys %$libraries ) {
218
   foreach my $lib ( keys %$libraries ) {
-
 
219
      print "Checking on libarary $lib\n";
219
      eval( "use $lib;" );
220
      eval( "use $lib;" );
220
      if ( $@ ) {
221
      if ( $@ ) {
-
 
222
         print "\tNot found, adding\n";
221
         push @command,$$libraries{$lib}{$os} if $$libraries{$lib}{$os};
223
         push @command,$$libraries{$lib}{$os} if $$libraries{$lib}{$os};
222
         push @missingLibs, $lib;
224
         push @missingLibs, $lib;
223
      }
225
      }
224
   }
226
   }
225
   if ( @missingLibs ) { # we have missing libraries
227
   if ( @missingLibs ) { # we have missing libraries
Line 511... Line 513...
511
 
513
 
512
# figure out if we know our operating system and set up special stuff for it
514
# figure out if we know our operating system and set up special stuff for it
513
$os = &setUpOperatingSystemSpecific( \%install, \%operatingSystems, $os );
515
$os = &setUpOperatingSystemSpecific( \%install, \%operatingSystems, $os );
514
 
516
 
515
&validateLibraries( \%libraries, $os );
517
&validateLibraries( \%libraries, $os );
-
 
518
 
-
 
519
# we don't get to use YAML unless it is installed
-
 
520
# so we have to put it in a conditional
516
use YAML::Tiny;
521
eval( "use YAML::Tiny" );
517
 
522
 
518
$installType = &getInstallActions( \%install );
523
$installType = &getInstallActions( \%install );
519
 
524
 
520
# based on the defaults, flesh out the install hash
525
# based on the defaults, flesh out the install hash
521
$status = &populateSourceDir( \%install, $sourceDir );
526
$status = &populateSourceDir( \%install, $sourceDir );