}
}
+sub saveFileIndex {
+ my $filepath = shift;
+ my $fileRepoPath = shift;
+ my $index = rindex($filepath, '/');
+ my $record = "$fileRepoPath/".substr($filepath, $index + 1, length($filepath));
+ my $filename = "$build_root/local/results";
+ open(my $fh, '>>', $filename) or die "Could not open file '$filename' $!";
+ print $fh "$record\n";
+ close $fh;
+}
+
#---------------------------------------------------------------------
# Generate buid command and run it
#---------------------------------------------------------------------
foreach (@srpms) {
$_ =~ s/\n//;
my_system ("sudo ln '$_' '$srpm_repo_path'");
+ saveFileIndex($_, $srpm_repo_path);
}
}
} elsif ($skip_srcrpm == 1){
foreach (@rpms) {
$_ =~ s/\n//;
my_system ("sudo ln '$_' '$rpm_repo_path'");
+ saveFileIndex($_, $rpm_repo_path);
}
}