aboutsummaryrefslogtreecommitdiffstats
path: root/bin
diff options
context:
space:
mode:
Diffstat (limited to 'bin')
-rwxr-xr-xbin/update-all-reports14
1 files changed, 13 insertions, 1 deletions
diff --git a/bin/update-all-reports b/bin/update-all-reports
index 4545cf1a8..02f9fda78 100755
--- a/bin/update-all-reports
+++ b/bin/update-all-reports
@@ -17,5 +17,17 @@ BEGIN {
}
use FixMyStreet::Script::UpdateAllReports;
+use Getopt::Long::Descriptive;
-FixMyStreet::Script::UpdateAllReports::generate();
+my ($opt, $usage) = describe_options(
+ '%c %o',
+ [ 'dashboard', "Output JSON for new dashboard-style page." ],
+ [ 'help', "print usage message and exit", { shortcircuit => 1 } ],
+);
+print($usage->text), exit if $opt->help;
+
+if ($opt->dashboard) {
+ FixMyStreet::Script::UpdateAllReports::generate_dashboard();
+} else {
+ FixMyStreet::Script::UpdateAllReports::generate();
+}