mirror of
https://github.com/dkogan/feedgnuplot.git
synced 2025-05-06 06:21:16 +08:00
Now reading the version of gnuplot on the system, and not using --persist on versions of gnuplot too
old to support it.
This commit is contained in:
parent
7c9c9b82be
commit
6b169e03a8
@ -8,6 +8,16 @@ use Data::Dumper;
|
||||
use threads;
|
||||
use Thread::Queue;
|
||||
|
||||
open(GNUPLOT_VERSION, "gnuplot --version |");
|
||||
my ($gnuplotVersion) = <GNUPLOT_VERSION> =~ /gnuplot\s*([0-9]*\.[0-9]*)/;
|
||||
if(!$gnuplotVersion)
|
||||
{
|
||||
print STDERR "Couldn't find the version of gnuplot. Does it work? Trying anyway...\n";
|
||||
$gnuplotVersion = 0;
|
||||
}
|
||||
|
||||
close(GNUPLOT_VERSION);
|
||||
|
||||
my $usage = <<OEF;
|
||||
Usage: $0 <options>
|
||||
|
||||
@ -172,7 +182,11 @@ sub plotThread
|
||||
sub mainThread {
|
||||
local *PIPE;
|
||||
my $dopersist = "";
|
||||
|
||||
if($gnuplotVersion >= 4.3)
|
||||
{
|
||||
$dopersist = "--persist" if(!$options{"stream"});
|
||||
}
|
||||
|
||||
if(exists $options{"dump"})
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user