You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

70 lines
1.3 KiB

use IO;
# input specification
my ($version, $platform) = @ARGV;
my @list = (qw(
lib/*.a
lib/*.so*
lib/sysliblist
lib
lib32/*.a
lib32/*.so*
lib32/sysliblist
lib32
rdbms/
!rdbms/jlib/
!rdbms/admin/
!rdbms/install/
network
network/mesg/
network/admin/
network/lib/
network/lib32/
ocommon/
!ocommon/nls/lbuilder/
bin/sqlplus
bin/tnsping
bin
sqlplus/
oracore/zoneinfo/
oracore
));
# determine effective file list
my @files = ();
foreach my $file (@list) {
my $not = 0;
if ($file =~ m|^!(.+)$|) {
$not = 1;
$file = $1;
}
my @paths = ();
if ($file =~ m|.+/$|) {
foreach my $p (`find $file -depth -print`) {
$p =~ s|\r?\n$||s;
push(@paths, $p);
}
}
else {
push(@paths, glob($file));
}
if ($not) {
my @files2 = grep {
my $x = $_;
not grep(/^\Q$x\E$/, @paths);
} @files;
@files = @files2;
}
else {
push(@files, @paths);
}
}
# roll CPIO archives
my $io = new IO::File
"| cpio -oL 2>/dev/null" .
"| bzip2 -9 >oracle-barebone-$version.$platform.cpio.bz2";
$io->print(join("\n", @files)."\n");
$io->close();