move .repo file creation
@@ -140,6 +140,19 @@ foreach my $distro (@distros) {
}
}
+ # add .repo file(s)
+
+ print "Adding [base] repofile contents\n";
+ copy("repo.base.in","$tmp_dir/$distro/OpenHPC.local.repo") || die "Unable to copy repo.base.in\n";
+ if($micro) {
+ print "Adding [update] repofile contents\n";
+ open (BASE, ">>","$tmp_dir/$distro/OpenHPC.local.repo") || die "Unable to append to repo file\n";
+ open (UPDATE,"<","repo.update.in") || die "Unable to access repo.update.in\n";
+ print BASE <UPDATE>;
+ close BASE;
+ close UPDATE;
+ }
+
$tar_args .= " $tmp_dir/$distro";
print "\nCreating dist for $distro:$arch -- \n";
print "tar command -> tar $tar_args\n";
@@ -174,18 +187,7 @@ foreach my $distro (@distros) {
$tar_args .= "--exclude $tmp_dir/$distro/iso \\\n";
$tar_args .= " $tmp_dir/$distro";
- # add .repo file(s)
- print "Adding [base] repofile contents\n";
- copy("repo.base.in","$tmp_dir/$distro/OpenHPC.local.repo") || die "Unable to copy repo.base.in\n";
- if($micro) {
- print "Adding [update] repofile contents\n";
- open (BASE, ">>","$tmp_dir/$distro/OpenHPC.local.repo") || die "Unable to append to repo file\n";
- open (UPDATE,"<","repo.update.in") || die "Unable to access repo.update.in\n";
- print BASE <UPDATE>;
- close BASE;
- close UPDATE;
- }
print "dist for $distro:src -- \n";
print "tar command -> tar $tar_args\n";
