Build: check during make for perl script library requirements
[exim.git] / src / src / exim_id_update.src
index 28fff1c4d7433bf8731e42fd9abd629635594999..1597accc98e2cf318a2e23ee204e4a5e84d495f0 100644 (file)
@@ -25,12 +25,18 @@ my $id;
 
 my $b62 = '[0-9A-Za-z]';
 
-if (  !getopts('hud', \%opt)
+if (  !getopts('hudv', \%opt)
    || $opt{h}
-   || !$opt{u} && !$opt{d}
+   || !$opt{v} && !$opt{u} && !$opt{d}
    ) {
   &help; exit 1;
 }
+if ($opt{v}) {
+    print "exim_id_update:\n",
+          "build: EXIM_RELEASE_VERSIONEXIM_VARIANT_VERSION\n",
+          "perl(runtime): $]\n";
+    exit 0;
+}
 
 $spool = $ARGV[0] if ($ARGV[0]);
 $mode_upgrade = $opt{u};
@@ -42,11 +48,12 @@ in spool files.  Only the filenames is first-line ID tag values
 are affected; not message content such as Message-ID fields.
 Only -H, -D and -J files are handled.
 
-Syntax:  exim_id_update [-d | -u | -h] [spooldir]
+Syntax:  exim_id_update [-d | -u | -h | -v] [spooldir]
 
        -d      Downgrade mode
        -h      This help message
        -u      Upgrade mode
+       -v      Version
 
 Exactly one of -d or -u must be given.
 The spool directory defaults to the build-time value,