comparison glang-galaxy-conf/gembassy/gembassy_calcandplot_wrapper.pl @ 2:8947fca5f715 draft default tip

Uploaded
author ktnyt
date Fri, 26 Jun 2015 05:21:44 -0400
parents
children
comparison
equal deleted inserted replaced
1:84a17b3fad1f 2:8947fca5f715
1 #! /usr/bin/perl -w
2 use strict;
3 use File::Copy;
4
5 my $png_outfile = pop(@ARGV);
6 my $csv_outfile = pop(@ARGV);
7
8 my $csv_cmd = join(" ", (@ARGV, "-noplot -outfile $csv_outfile"));
9 my $png_cmd = join(" ", (@ARGV, "-plot -graph png -goutfile $png_outfile"));
10
11 my $csv_results = `$csv_cmd`;
12 my $png_results = `$png_cmd`;
13 my @files = split("\n", $png_results);
14 my ($drive, $outputDir, $file) = File::Spec->splitpath( $png_outfile );
15
16 foreach my $thisLine (@files)
17 {
18 if ($thisLine =~ /Created /)
19 {
20 $thisLine =~ /[\w|\.]+$/;
21 $thisLine = $&;
22 #print "outfile: $thisLine\n";
23 #there is only one file to move, so we can quit after finding it
24 move($drive.$outputDir.$thisLine, $png_outfile);
25 exit(1);
26 }
27 else
28 {
29 print $thisLine, "\n";
30 }
31 }