view emboss_single_outputfile_wrapper.pl @ 12:832c20329690 draft

planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/emboss_5 commit ca9a6baaede679d619675e48d665748a91950115
author iuc
date Mon, 23 Apr 2018 13:05:09 -0400
parents d49956b87f7e
children dba489bfcd62
line wrap: on
line source

#! /usr/bin/perl -w
use strict;
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";
	}
}