diff options
author | Marius Halden <marius.h@lden.org> | 2015-11-16 11:15:10 +0100 |
---|---|---|
committer | Marius Halden <marius.h@lden.org> | 2015-11-16 11:15:10 +0100 |
commit | 1339a64632c441e4d7858bd5946738c9840c624d (patch) | |
tree | 0b1393ca9af05d1af690fbf6c569c195f4136e4c /bin/problem-creation-graph | |
parent | 17cc40a8a2387669984ae4a36bb0d30d889d1a07 (diff) | |
parent | 4fb5331abd2fa4c89ebeb89bc92a245fadd0aa19 (diff) |
Merge branch 'fiksgatami-dev' into fiksgatami-prod
Oppgrader prod til 1.7
Diffstat (limited to 'bin/problem-creation-graph')
-rwxr-xr-x | bin/problem-creation-graph | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/bin/problem-creation-graph b/bin/problem-creation-graph index c3d10f934..3e46777f4 100755 --- a/bin/problem-creation-graph +++ b/bin/problem-creation-graph @@ -10,12 +10,12 @@ use strict; use warnings; require 5.8.0; +my $DIR; BEGIN { use File::Basename qw(dirname); use File::Spec; - my $d = dirname(File::Spec->rel2abs($0)); - chdir "$d/.."; - require "$d/../setenv.pl"; + $DIR = dirname(dirname(File::Spec->rel2abs($0))); + require "$DIR/setenv.pl"; } use File::Temp qw(tempfile); @@ -113,6 +113,6 @@ $gp .= <<END; "< awk 'BEGIN { n = 0 } { n += \$2; print \$1, \$2, n; }' $sources{unconfirmed}" using 1:3 axes x1y2 with lines lt 0 title "cumulative total number of problems" END -open(my $gnuplot, '|-', "GDFONTPATH=/usr/share/fonts/truetype/ttf-bitstream-vera gnuplot > web/fms-live-creation$config{extension} 2> /dev/null"); +open(my $gnuplot, '|-', "GDFONTPATH=/usr/share/fonts/truetype/ttf-bitstream-vera gnuplot > $DIR/web/fms-live-creation$config{extension} 2> /dev/null") or die $!; $gnuplot->print($gp); close $gnuplot; |