diff options
| author | Paul Buetow <paul@buetow.org> | 2025-07-13 13:15:27 +0300 |
|---|---|---|
| committer | Paul Buetow <paul@buetow.org> | 2025-07-13 13:15:27 +0300 |
| commit | 06ae46c9c522ed66ba4392fe221d93286539a702 (patch) | |
| tree | b3b538c633cf3ad9e1001eaac8c6e29c715e8f12 /frontends/scripts | |
| parent | 6901512992a6ecbbf651d254e588dc13beae154f (diff) | |
Update
Diffstat (limited to 'frontends/scripts')
| -rw-r--r-- | frontends/scripts/foostats.pl | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/frontends/scripts/foostats.pl b/frontends/scripts/foostats.pl index 2783b2d..7dbc26d 100644 --- a/frontends/scripts/foostats.pl +++ b/frontends/scripts/foostats.pl @@ -15,6 +15,8 @@ no warnings qw(experimental::refaliasing); # TODO: UNDO use diagnostics; +use constant VERSION => 'v0.1.0'; + # TODO: Blog post about this script and the new Perl features used. # TODO NEXT: # * Write out a nice output from each merged file, also merge if multiple hosts results @@ -1513,6 +1515,7 @@ package main { Default: /var/log/fooodds --partner-node <hostname> Hostname of the partner node for replication. Default: fishfinger.buetow.org or blowfish.buetow.org + --version Show version information. --help Show this help message. USAGE exit 0; @@ -1530,7 +1533,7 @@ package main { $out->write; } - my ( $parse_logs, $replicate, $report, $all, $help ); + my ( $parse_logs, $replicate, $report, $all, $help, $version ); # With default values my $stats_dir = '/var/www/htdocs/buetow.org/self/foostats'; @@ -1554,8 +1557,14 @@ package main { 'output-dir=s' => \$output_dir, 'html-output-dir=s' => \$html_output_dir, 'partner-node=s' => \$partner_node, + 'version' => \$version, 'help|?' => \$help; + if ($version) { + print "foostats " . VERSION . "\n"; + exit 0; + } + usage() if $help; parse_logs( $stats_dir, $odds_file, $odds_log ) |
