[Box Backup-commit] COMMIT r2046 - box/trunk/infrastructure
boxbackup-dev at fluffy.co.uk
boxbackup-dev at fluffy.co.uk
Mon Jan 21 00:49:47 GMT 2008
Author: chris
Date: 2008-01-21 00:49:46 +0000 (Mon, 21 Jan 2008)
New Revision: 2046
Modified:
box/trunk/infrastructure/makedistribution.pl.in
Log:
Clean up distribution script.
Allow NO-LICENSE-IN-DIR to copy the dir as well.
Exclude configure-generated SMF files, leaving the original sources.
Modified: box/trunk/infrastructure/makedistribution.pl.in
===================================================================
--- box/trunk/infrastructure/makedistribution.pl.in 2008-01-20 23:44:53 UTC (rev 2045)
+++ box/trunk/infrastructure/makedistribution.pl.in 2008-01-21 00:49:46 UTC (rev 2046)
@@ -82,11 +82,11 @@
my $list = $_[0];
open LIST,$list or die "Can't open $list";
- while(<LIST>)
+ while(my $line = <LIST>)
{
- next unless m/\S/;
- chomp;
- my ($src,$dst) = split /\s+/;
+ next unless $line =~ m/\S/;
+ chomp $line;
+ my ($src,$dst,$other) = split /\s+/, $line;
$dst = $src if $dst eq '';
if($src eq 'MKDIR')
{
@@ -95,8 +95,16 @@
}
elsif($src eq 'NO-LICENSE-IN-DIR')
{
+ my ($junk,$spec) = split /\s+/, $line;
# record that this directory shouldn't have the license added
$no_license_dir{$dst} = 1;
+
+ # actually copy it, to remove redundancy in manifests
+ $src = $dst;
+ $dst = $other;
+ $dst = $src if $dst eq '';
+ $modules_included{$spec} = 1;
+ copy_dir($src,$dst);
}
elsif($src eq 'REPLACE-VERSION-IN')
{
@@ -108,16 +116,17 @@
}
elsif($src eq 'RUN')
{
- print "Running $dst...\n";
- if(system($dst) != 0)
+ my ($junk,$cmd) = split /\s+/, $line, 2;
+ print "Running $cmd...\n";
+ if(system($cmd) != 0)
{
- print "Error running $dst. Aborting.\n";
+ print "Error running $cmd. Aborting.\n";
exit(1);
}
}
elsif(-d $src)
{
- $modules_included{$_} = 1;
+ $modules_included{$line} = 1;
copy_dir($src,$dst);
}
else
@@ -322,6 +331,8 @@
next if m/\A_/;
next if m/\AMakefile\Z/;
next if m/\Aautogen/;
+ next if m/-smf-method\Z/; # copy only the .in versions
+ next if m/-manifest.xml\Z/; # copy onlt the .in versions
next if !-f "$dir/$_";
copy_file("$dir/$_","$dst_dir/$_");
More information about the Boxbackup-commit
mailing list