#!/usr/bin/perl

use strict;
use warnings;


my $target;
if (!defined($ARGV[0])){
  print "USAGE: $0 <TARGET>
	The script sends tasks for evaluation at malbecs\n";
  exit;
} else  {
  $target = $ARGV[0];
}

if (! -d "/local/CASP13/RAND_MODELS/$target"){
   print "USAGE: $0 <TARGET>
        The script sends tasks for evaluation at malbecs\n";
   print "Directory /local/CASP13/RAND_MODELS/$target doesn't exist\n";
   exit;
}

if (! -e "/local/CASP13/TARGETS/$target.pdb"){
   print "USAGE: $0 <TARGET>
        The script sends tasks for evaluation at malbecs\n";
   print "File /local/CASP13/TARGETS/$target.pdb doesn't exist\n";
   exit;
}

system(sprintf("cd /local/Projects/Perl/casp13/src/scripts/evaluation_scripts/ ; ./rsync_upload.sh '%s' '%s' '%s' '%s' > /tmp/log.log", $target, "random_lga_sda", "*", ""));


