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/problems-filed-graph | |
parent | 17cc40a8a2387669984ae4a36bb0d30d889d1a07 (diff) | |
parent | 4fb5331abd2fa4c89ebeb89bc92a245fadd0aa19 (diff) |
Merge branch 'fiksgatami-dev' into fiksgatami-prod
Oppgrader prod til 1.7
Diffstat (limited to 'bin/problems-filed-graph')
-rwxr-xr-x | bin/problems-filed-graph | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/bin/problems-filed-graph b/bin/problems-filed-graph index abfe0cf1a..a930e4346 100755 --- a/bin/problems-filed-graph +++ b/bin/problems-filed-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); @@ -62,6 +62,6 @@ my $gp = <<END; plot "$source" using 1:2 with lines axes x1y2 lt 3 title "FixMyStreet problem reports" END -open(my $gnuplot, '|-', "GDFONTPATH=/usr/share/fonts/truetype/ttf-bitstream-vera gnuplot > web/fms-live-line$config{extension} 2> /dev/null"); +open(my $gnuplot, '|-', "GDFONTPATH=/usr/share/fonts/truetype/ttf-bitstream-vera gnuplot > $DIR/web/fms-live-line$config{extension} 2> /dev/null") or die $!; $gnuplot->print($gp); close $gnuplot; |