2023-02-21 20:05:03 +00:00
|
|
|
#!/usr/bin/perl
|
|
|
|
|
|
|
|
$pwd=`pwd`;
|
|
|
|
chomp $pwd;
|
|
|
|
|
2023-04-21 18:12:37 +00:00
|
|
|
$dir="el7-dev-20230418";
|
2023-02-21 20:05:03 +00:00
|
|
|
$baseDir="$dir-cave";
|
|
|
|
|
|
|
|
`rm -rf $baseDir`;
|
|
|
|
`mkdir $baseDir`;
|
|
|
|
|
|
|
|
open IN, "<comps-cave.xml" or die "cannot open\n";
|
|
|
|
@lines=<IN>;
|
|
|
|
|
|
|
|
foreach $line(@lines)
|
|
|
|
{
|
|
|
|
chomp $line;
|
|
|
|
if($line !~/mandatory/) { next; }
|
|
|
|
$line=~s/<\/packagereq>//g;
|
|
|
|
@splitLine=split(/>/,$line);
|
|
|
|
|
|
|
|
$rpm=$splitLine[1];
|
|
|
|
print "$rpm\n";
|
|
|
|
|
|
|
|
$find=`find $pwd/$dir -name $rpm-[0-9]*rpm`;
|
|
|
|
chomp $find;
|
|
|
|
|
|
|
|
if($find=~/noarch/)
|
|
|
|
{ `rsync -aP $dir/noarch/$rpm-[0-9]*rpm $baseDir/noarch/`; }
|
|
|
|
if($find=~/x86_64/)
|
|
|
|
{ `rsync -aP $dir/x86_64/$rpm-[0-9]*rpm $baseDir/x86_64/`; }
|
|
|
|
}
|
|
|
|
|
|
|
|
`sudo su - -c \"createrepo -g $pwd/comps-cave.xml $pwd/$baseDir\"`;
|
|
|
|
`sudo chown -R awips:fxalpha $baseDir`;
|
2023-04-21 18:12:37 +00:00
|
|
|
|
|
|
|
`rsync -aP $pwd/$baseDir tiffanym\@fserv:/share/awips2/20.3.2/linux/rpms/cave`;
|