Subversion Repositories camp_sysinfo_client (old)

Rev

Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
1 rodolico 1
#! /usr/bin/perl -w
2
 
3
use File::Basename;
4
 
5
my $TARGET = '/tmp/sysinfo_debian';
6
 
7
my %files = ( 
8
  'sysinfo.cron.d'         => '/etc/cron.d/sysinfo',
9
  'sysinfo.conf'           => '/etc/sysinfo/',
10
  'custom_commands'        => '/etc/sysinfo/',
11
  'doc/*'                  => '/usr/share/doc/sysinfo-client',
12
  'man/*'                  => '/usr/share/man/',
13
  'SysinfoLinux.pm'        => '/usr/lib/perl5/',
14
  'SysinfoWindows.pm'      => '/usr/lib/perl5/',
15
  'sysinfo-client'         => '/usr/sbin/',
16
  'installers/DEBIAN'      => ''
17
  );
18
 
19
foreach my $source ( keys %files ) {
20
   my $target = $TARGET . $files{$source};
21
#   if ( -d $source ) {
22
#      $targetDir = $files{$source};
23
#   } elsif ( -f $source ) {
24
#      print "$source is a file\n";
25
   $targetDir = ( $target =~ m/\/$/ ) ? $target : dirname( $target );
26
   `mkdir -p $targetDir` unless -d $targetDir;
27
   `cp -av $source $target`;
28
}