Skip to content

Commit

Permalink
command -v fix ubuntu
Browse files Browse the repository at this point in the history
  • Loading branch information
Pombert-JF committed Dec 21, 2021
1 parent 6259ff3 commit ab7f680
Showing 1 changed file with 14 additions and 14 deletions.
28 changes: 14 additions & 14 deletions setup_3DFI.pl
Original file line number Diff line number Diff line change
Expand Up @@ -104,23 +104,11 @@
}
## Checking for Docker
if ($predictor eq 'alphafold'){
my $docker = `command -v docker`;
chomp $docker;
if ($docker eq ''){
print "\n[E] Docker not found. AlphaFold requires Docker. Please make sure that Docker is properly installed before using setup_3DFI.pl.\n";
print "[E] Exiting...\n\n";
exit;
}
check_program('docker', 'AlphaFold');
}
## Checking for Conda
elsif ($predictor eq 'rosettafold'){
my $conda = `command -v conda`;
chomp $conda;
if ($conda eq ''){
print "\n[E] Conda not found. RoseTTAFold requires Conda. Please make sure that Conda is properly installed before using setup_3DFI.pl.\n";
print "[E] Exiting...\n\n";
exit;
}
check_program('conda', 'RoseTTAFold');
}
}

Expand Down Expand Up @@ -351,6 +339,18 @@

######################################################
# subroutines
sub check_program {
my $program = $_[0];
my $prereq = $_[1];
my $status = `echo \$(command -v $program)`;
chomp $status;
if ($status eq ''){
print "\n[E] $program not found. $prereq requires $program. Please make sure that $program is properly installed before using setup_3DFI.pl.\n";
print "[E] Exiting...\n\n";
exit;
}
}

sub set_main {
my $fh = shift;
my $bar = '#' x 50;
Expand Down

0 comments on commit ab7f680

Please sign in to comment.