Mercurial > repos > devteam > emboss_5
annotate emboss_single_outputfile_wrapper.pl @ 13:d5c3794bd246 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:04:47 -0400 |
parents | 9b98d3d903c6 |
children | bde3097ac0f6 |
rev | line source |
---|---|
10
9b98d3d903c6
planemo upload for repository https://github.com/galaxyproject/tools-devteam/tree/master/tools/emboss_5 commit fc158bfe5f5927dc199321a2cf43310373cbc8ba
devteam
parents:
diff
changeset
|
1 #! /usr/bin/perl -w |
9b98d3d903c6
planemo upload for repository https://github.com/galaxyproject/tools-devteam/tree/master/tools/emboss_5 commit fc158bfe5f5927dc199321a2cf43310373cbc8ba
devteam
parents:
diff
changeset
|
2 use strict; |
9b98d3d903c6
planemo upload for repository https://github.com/galaxyproject/tools-devteam/tree/master/tools/emboss_5 commit fc158bfe5f5927dc199321a2cf43310373cbc8ba
devteam
parents:
diff
changeset
|
3 use File::Copy; |
9b98d3d903c6
planemo upload for repository https://github.com/galaxyproject/tools-devteam/tree/master/tools/emboss_5 commit fc158bfe5f5927dc199321a2cf43310373cbc8ba
devteam
parents:
diff
changeset
|
4 |
9b98d3d903c6
planemo upload for repository https://github.com/galaxyproject/tools-devteam/tree/master/tools/emboss_5 commit fc158bfe5f5927dc199321a2cf43310373cbc8ba
devteam
parents:
diff
changeset
|
5 my $cmd_string = join (" ",@ARGV); |
9b98d3d903c6
planemo upload for repository https://github.com/galaxyproject/tools-devteam/tree/master/tools/emboss_5 commit fc158bfe5f5927dc199321a2cf43310373cbc8ba
devteam
parents:
diff
changeset
|
6 my $results = `$cmd_string`; |
9b98d3d903c6
planemo upload for repository https://github.com/galaxyproject/tools-devteam/tree/master/tools/emboss_5 commit fc158bfe5f5927dc199321a2cf43310373cbc8ba
devteam
parents:
diff
changeset
|
7 my @files = split("\n",$results); |
9b98d3d903c6
planemo upload for repository https://github.com/galaxyproject/tools-devteam/tree/master/tools/emboss_5 commit fc158bfe5f5927dc199321a2cf43310373cbc8ba
devteam
parents:
diff
changeset
|
8 my $fileNameOut = $ARGV[6]; |
9b98d3d903c6
planemo upload for repository https://github.com/galaxyproject/tools-devteam/tree/master/tools/emboss_5 commit fc158bfe5f5927dc199321a2cf43310373cbc8ba
devteam
parents:
diff
changeset
|
9 my ($drive, $outputDir, $file) = File::Spec->splitpath( $fileNameOut ); |
9b98d3d903c6
planemo upload for repository https://github.com/galaxyproject/tools-devteam/tree/master/tools/emboss_5 commit fc158bfe5f5927dc199321a2cf43310373cbc8ba
devteam
parents:
diff
changeset
|
10 my $destination = $fileNameOut; |
9b98d3d903c6
planemo upload for repository https://github.com/galaxyproject/tools-devteam/tree/master/tools/emboss_5 commit fc158bfe5f5927dc199321a2cf43310373cbc8ba
devteam
parents:
diff
changeset
|
11 |
9b98d3d903c6
planemo upload for repository https://github.com/galaxyproject/tools-devteam/tree/master/tools/emboss_5 commit fc158bfe5f5927dc199321a2cf43310373cbc8ba
devteam
parents:
diff
changeset
|
12 foreach my $thisLine (@files) |
9b98d3d903c6
planemo upload for repository https://github.com/galaxyproject/tools-devteam/tree/master/tools/emboss_5 commit fc158bfe5f5927dc199321a2cf43310373cbc8ba
devteam
parents:
diff
changeset
|
13 { |
9b98d3d903c6
planemo upload for repository https://github.com/galaxyproject/tools-devteam/tree/master/tools/emboss_5 commit fc158bfe5f5927dc199321a2cf43310373cbc8ba
devteam
parents:
diff
changeset
|
14 if ($thisLine =~ /Created /) |
9b98d3d903c6
planemo upload for repository https://github.com/galaxyproject/tools-devteam/tree/master/tools/emboss_5 commit fc158bfe5f5927dc199321a2cf43310373cbc8ba
devteam
parents:
diff
changeset
|
15 { |
9b98d3d903c6
planemo upload for repository https://github.com/galaxyproject/tools-devteam/tree/master/tools/emboss_5 commit fc158bfe5f5927dc199321a2cf43310373cbc8ba
devteam
parents:
diff
changeset
|
16 $thisLine =~ /[\w|\.]+$/; |
9b98d3d903c6
planemo upload for repository https://github.com/galaxyproject/tools-devteam/tree/master/tools/emboss_5 commit fc158bfe5f5927dc199321a2cf43310373cbc8ba
devteam
parents:
diff
changeset
|
17 $thisLine =$&; |
9b98d3d903c6
planemo upload for repository https://github.com/galaxyproject/tools-devteam/tree/master/tools/emboss_5 commit fc158bfe5f5927dc199321a2cf43310373cbc8ba
devteam
parents:
diff
changeset
|
18 #print "outfile: $thisLine\n"; |
9b98d3d903c6
planemo upload for repository https://github.com/galaxyproject/tools-devteam/tree/master/tools/emboss_5 commit fc158bfe5f5927dc199321a2cf43310373cbc8ba
devteam
parents:
diff
changeset
|
19 #there is only one file to move, so we can quit after finding it |
9b98d3d903c6
planemo upload for repository https://github.com/galaxyproject/tools-devteam/tree/master/tools/emboss_5 commit fc158bfe5f5927dc199321a2cf43310373cbc8ba
devteam
parents:
diff
changeset
|
20 move($drive.$outputDir.$thisLine,$fileNameOut); |
9b98d3d903c6
planemo upload for repository https://github.com/galaxyproject/tools-devteam/tree/master/tools/emboss_5 commit fc158bfe5f5927dc199321a2cf43310373cbc8ba
devteam
parents:
diff
changeset
|
21 exit(1); |
9b98d3d903c6
planemo upload for repository https://github.com/galaxyproject/tools-devteam/tree/master/tools/emboss_5 commit fc158bfe5f5927dc199321a2cf43310373cbc8ba
devteam
parents:
diff
changeset
|
22 } |
9b98d3d903c6
planemo upload for repository https://github.com/galaxyproject/tools-devteam/tree/master/tools/emboss_5 commit fc158bfe5f5927dc199321a2cf43310373cbc8ba
devteam
parents:
diff
changeset
|
23 else |
9b98d3d903c6
planemo upload for repository https://github.com/galaxyproject/tools-devteam/tree/master/tools/emboss_5 commit fc158bfe5f5927dc199321a2cf43310373cbc8ba
devteam
parents:
diff
changeset
|
24 { |
9b98d3d903c6
planemo upload for repository https://github.com/galaxyproject/tools-devteam/tree/master/tools/emboss_5 commit fc158bfe5f5927dc199321a2cf43310373cbc8ba
devteam
parents:
diff
changeset
|
25 print $thisLine,"\n"; |
9b98d3d903c6
planemo upload for repository https://github.com/galaxyproject/tools-devteam/tree/master/tools/emboss_5 commit fc158bfe5f5927dc199321a2cf43310373cbc8ba
devteam
parents:
diff
changeset
|
26 } |
9b98d3d903c6
planemo upload for repository https://github.com/galaxyproject/tools-devteam/tree/master/tools/emboss_5 commit fc158bfe5f5927dc199321a2cf43310373cbc8ba
devteam
parents:
diff
changeset
|
27 } |