aboutsummaryrefslogtreecommitdiffstats
path: root/bin/problem-creation-graph
diff options
context:
space:
mode:
authorMatthew Somerville <matthew-github@dracos.co.uk>2015-01-15 15:33:21 +0000
committerMatthew Somerville <matthew-github@dracos.co.uk>2015-01-19 16:35:37 +0000
commit8e6d48d5ee351594fc92f1e680ba4a2219ed57ca (patch)
treea32bdde6047f357663883a995393a945e1dadff2 /bin/problem-creation-graph
parent96dd07e7c1dab2c8f9250af435caad2c2818b5a2 (diff)
Remove need for cron-wrapper with existing scripts
Call the necessary boilerplate in each script so you can call them directly. Remove boilerplate from files that don't need it.
Diffstat (limited to 'bin/problem-creation-graph')
-rwxr-xr-xbin/problem-creation-graph11
1 files changed, 8 insertions, 3 deletions
diff --git a/bin/problem-creation-graph b/bin/problem-creation-graph
index e1b6f2cc4..c3d10f934 100755
--- a/bin/problem-creation-graph
+++ b/bin/problem-creation-graph
@@ -10,13 +10,18 @@ use strict;
use warnings;
require 5.8.0;
-use FindBin;
+BEGIN {
+ use File::Basename qw(dirname);
+ use File::Spec;
+ my $d = dirname(File::Spec->rel2abs($0));
+ chdir "$d/..";
+ require "$d/../setenv.pl";
+}
+
use File::Temp qw(tempfile);
use FixMyStreet::App;
-chdir("$FindBin::Bin/../");
-
my %config = (
gplot_output => "set terminal png font 'Vera.ttf' 9 size 1200,400",
extension => '.png',