Add --version to all installed Perl and Shell scripts.
[exim.git] / src / src / eximstats.src
index 80ac9337266c1505ee4ecfce119382bc0f385d7c..99f4c195f6cf094320eb2e10b9b599c676102465 100644 (file)
@@ -552,10 +552,18 @@ use integer;
 BEGIN { pop @INC if $INC[-1] eq '.' };
 use strict;
 use IO::File;
+use File::Basename;
 
 # use Time::Local;  # PH/FANF
 use POSIX;
 
+if ($ARGV[0] eq '--version') {
+    print basename($0) . ": $0\n",
+        "build: EXIM_RELEASE_VERSIONEXIM_VARIANT_VERSION\n",
+        "perl(runtime): $^V\n";
+        exit 0;
+}
+
 use vars qw($HAVE_GD_Graph_pie $HAVE_GD_Graph_linespoints $HAVE_Spreadsheet_WriteExcel);
 eval { require GD::Graph::pie; };
 $HAVE_GD_Graph_pie = $@ ? 0 : 1;