cvsuser 04/10/07 01:49:54
Modified: . MANIFEST.generated
tools/dev install_files.pl
Log:
runtime prefix 2 - install only main section; --dry-run switch
Revision Changes Path
1.6 +1 -0 parrot/MANIFEST.generated
Index: MANIFEST.generated
===================================================================
RCS file: /cvs/public/parrot/MANIFEST.generated,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -w -r1.5 -r1.6
--- MANIFEST.generated 6 Oct 2004 04:53:45 -0000 1.5
+++ MANIFEST.generated 7 Oct 2004 08:49:53 -0000 1.6
@@ -44,3 +44,4 @@
runtime/parrot/include/timer.pasm [main]
runtime/parrot/include/tm.pasm [main]
runtime/parrot/include/vtable_methods.pasm [main]
+blib/lib/icu/2.6.1/icudt26l.dat [main]
1.9 +26 -15 parrot/tools/dev/install_files.pl
Index: install_files.pl
===================================================================
RCS file: /cvs/public/parrot/tools/dev/install_files.pl,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -w -r1.8 -r1.9
--- install_files.pl 4 Oct 2004 05:06:26 -0000 1.8
+++ install_files.pl 7 Oct 2004 08:49:54 -0000 1.9
@@ -1,7 +1,7 @@
#! perl -w
################################################################################
# Copyright: 2001-2003 The Perl Foundation. All Rights Reserved.
-# $Id: install_files.pl,v 1.8 2004/10/04 05:06:26 sfink Exp $
+# $Id: install_files.pl,v 1.9 2004/10/07 08:49:54 leo Exp $
################################################################################
=head1 TITLE
@@ -123,6 +123,7 @@
bindir => '/usr/bin',
libdir => '/usr/lib',
includedir => '/usr/include',
+ 'dry-run' => 0,
);
my @manifests;
@@ -158,6 +159,9 @@
my ($package) = $meta =~ /^\[(.*?)\]/;
$meta =~ s/^\[(.*?)\]//;
next unless $package; # Skip if this file belongs to no package
+
+ next unless $package eq 'main'; # XXX -lt
+
my %meta;
@meta{split(/,/, $meta)} = ();
$meta{$_} = 1 for (keys %meta); # Laziness
@@ -181,6 +185,7 @@
close ARGV if eof; # Reset line numbering for each input file
}
+unless ($options{'dry-run'}) {
for my $dir (keys %directories) {
unless (-d $dir) {
# Make full path to the directory $dir
@@ -194,10 +199,16 @@
}
}
}
-
+}
foreach (@files) {
my ($src, $dest) = @$_;
+ if ($options{'dry-run'}) {
+ print "cp $src \t$dest\n";
+ next;
+ }
+ else {
copy($src, $dest) or die "copy $src to $dest: $!\n";
+ }
my $mode = (stat($src))[2];
chmod $mode, $dest;
}