aboutsummaryrefslogtreecommitdiffstats
path: root/bin/fetch-comments
diff options
context:
space:
mode:
authorMatthew Somerville <matthew@mysociety.org>2020-04-03 14:00:41 +0100
committerMatthew Somerville <matthew@mysociety.org>2020-04-03 14:00:41 +0100
commit9ff04868ea123b8b309f1c5f22493bddff756c3a (patch)
tree5c3c06733daaccc62e3100bbb5b5bb2a572b3160 /bin/fetch-comments
parent4590344c558a925408499be5a977b1ed94a22b1b (diff)
parent592d52838f3d1cd1824f6a37e273705112a7011a (diff)
Merge branch 'improve-fetch-scripts'
Diffstat (limited to 'bin/fetch-comments')
-rwxr-xr-xbin/fetch-comments27
1 files changed, 4 insertions, 23 deletions
diff --git a/bin/fetch-comments b/bin/fetch-comments
index 55ba70d85..0fb30f236 100755
--- a/bin/fetch-comments
+++ b/bin/fetch-comments
@@ -1,25 +1,6 @@
-#!/usr/bin/env perl
+#!/bin/bash
#
-# This script utilises the Open311 extension explained at
-# https://github.com/mysociety/FixMyStreet/wiki/Open311-FMS---Proposed-differences-to-Open311
-# to fetch updates on service requests.
+# Wrapper to call new script
-use strict;
-use warnings;
-require 5.8.0;
-
-BEGIN {
- use File::Basename qw(dirname);
- use File::Spec;
- my $d = dirname(File::Spec->rel2abs($0));
- require "$d/../setenv.pl";
-}
-
-use CronFns;
-my ($verbose, $nomail) = CronFns::options();
-
-use Open311::GetServiceRequestUpdates;
-
-my $updates = Open311::GetServiceRequestUpdates->new( verbose => $verbose );
-
-$updates->fetch;
+DIR="$(cd "$(dirname "$BASH_SOURCE")" && pwd -P)"
+$DIR/fetch --updates