2
0
mirror of https://github.com/xcat2/xcat-core.git synced 2025-08-26 21:20:29 +00:00

Get GitHub action script directory reference6

This commit is contained in:
Mark Gurevich
2022-06-30 11:05:39 -04:00
parent 635fd0b0be
commit 7929c2791e

View File

@@ -41,7 +41,7 @@ sub runcmd
my $rc = 0;
$::RUNCMD_RC = 0;
my $outref = [];
print "[[MG]] About to execute $cmd";
print " [[MG]] About to execute $cmd\n";
@$outref = `$cmd 2>&1`;
if ($?)
{
@@ -327,8 +327,8 @@ sub build_xcat_core{
#--------------------------------------------------------
sub install_xcat{
my @cmds = ("pwd",
"cd ./../../xcat-core && sudo ./mklocalrepo.sh",
my @cmds = ("sudo pwd",
"sudo cd ./../../xcat-core && sudo ./mklocalrepo.sh",
"sudo chmod 777 /etc/apt/sources.list",
"sudo echo \"deb [arch=amd64 allow-insecure=yes] http://xcat.org/files/xcat/repos/apt/devel/xcat-dep bionic main\" >> /etc/apt/sources.list",
"sudo echo \"deb [arch=ppc64el allow-insecure=yes] http://xcat.org/files/xcat/repos/apt/devel/xcat-dep bionic main\" >> /etc/apt/sources.list",
@@ -340,6 +340,7 @@ sub install_xcat{
@output = runcmd("cd $dir");
if($::RUNCMD_RC){
print RED "[MG] cd to $dir ...[Failed]\n";
print "[MG] RC was $::RUNCMD_RC\n";
print "[MG] error message:\n";
print Dumper \@output;
}
@@ -348,6 +349,7 @@ sub install_xcat{
@output = runcmd("cd $dir");
if($::RUNCMD_RC){
print RED "[MG] cd to $dir ...[Failed]\n";
print "[MG] RC was $::RUNCMD_RC\n";
print "[MG] error message:\n";
print Dumper \@output;
}
@@ -358,11 +360,11 @@ sub install_xcat{
my $workspace = $ENV{RUNNER_WORKSPACE};
@output = runcmd("cd $workspace");
print "[MG] {4} running cd $workspace\n";
print "[MG] {4} RUNNER_WORKSPACE running cd $workspace\n";
print "[MG] RC was $::RUNCMD_RC\n";
print "[MG] cd output:\n";
print Dumper \@output;
print "[MG] RUNNER_WORKSPACE=$workspace\n";
foreach my $cmd (@cmds){
print "[install_xcat] running $cmd\n";
@output = runcmd("$cmd");