view emboss_single_outputfile_wrapper.pl @ 17:bde3097ac0f6 draft

"planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/emboss_5 commit d5dfff2cd58b094e0e4a6f8dc475de5facd9700b"
author iuc
date Tue, 03 Dec 2019 02:12:56 +0000
parents 9b98d3d903c6
children
line wrap: on
line source

use strict;
use warnings;
use File::Copy;

my $cmd_string = join (" ",@ARGV);
my $results = `$cmd_string`;
my @files = split("\n",$results);
my $fileNameOut = $ARGV[6];
my ($drive, $outputDir, $file) = File::Spec->splitpath( $fileNameOut );
my $destination = $fileNameOut;

foreach my $thisLine (@files)
{
	if ($thisLine =~ /Created /)
	{
		$thisLine =~ /[\w|\.]+$/;
		$thisLine =$&;
		#print "outfile: $thisLine\n";
		#there is only one file to move, so we can quit after finding it
		move($drive.$outputDir.$thisLine,$fileNameOut);
		exit(1);
	}
	else
	{
		print $thisLine,"\n";
	}
}