Blame | Last modification | View Log | Download | RSS feed
#! /usr/bin/perl -w
use File::Basename;
my $TARGET = '/tmp/sysinfo_debian';
my %files = (
'sysinfo.cron.d' => '/etc/cron.d/sysinfo',
'sysinfo.conf' => '/etc/sysinfo/',
'custom_commands' => '/etc/sysinfo/',
'doc/*' => '/usr/share/doc/sysinfo-client',
'man/*' => '/usr/share/man/',
'SysinfoLinux.pm' => '/usr/lib/perl5/',
'SysinfoWindows.pm' => '/usr/lib/perl5/',
'sysinfo-client' => '/usr/sbin/',
'installers/DEBIAN' => ''
);
foreach my $source ( keys %files ) {
my $target = $TARGET . $files{$source};
# if ( -d $source ) {
# $targetDir = $files{$source};
# } elsif ( -f $source ) {
# print "$source is a file\n";
$targetDir = ( $target =~ m/\/$/ ) ? $target : dirname( $target );
`mkdir -p $targetDir` unless -d $targetDir;
`cp -av $source $target`;
}