summaryrefslogtreecommitdiff
path: root/img/dist/IM/imhsync.in
diff options
context:
space:
mode:
Diffstat (limited to 'img/dist/IM/imhsync.in')
-rw-r--r--img/dist/IM/imhsync.in33
1 files changed, 22 insertions, 11 deletions
diff --git a/img/dist/IM/imhsync.in b/img/dist/IM/imhsync.in
index 9c0fac91..211adb6f 100644
--- a/img/dist/IM/imhsync.in
+++ b/img/dist/IM/imhsync.in
@@ -5,7 +5,7 @@
###
### Author: Internet Message Group <img@mew.org>
### Created: Jul 02, 1998
-### Revised: Oct 28, 2003
+### Revised: Jul 4, 2004
###
BEGIN {
@@ -13,9 +13,15 @@ BEGIN {
@im_src_siteperl@
};
-my $VERSION = "imhsync version 20031028(IM146)";
-
$Prog = 'imhsync';
+my $VERSION_DATE = "20040704";
+my $VERSION_NUMBER = "147";
+my $VERSION = "${Prog} version ${VERSION_DATE}(IM${VERSION_NUMBER})";
+my $VERSION_INFORMATION = "${Prog} (IM ${VERSION_NUMBER}) ${VERSION_DATE}
+Copyright (C) 1999 IM developing team
+This is free software; see the source for copying conditions. There is NO
+warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+";
##
## Require packages
@@ -29,7 +35,7 @@ use IM::Util;
use integer;
use strict;
use vars qw($Prog $EXPLANATION @OptConfig @Hdr %Folder
- $opt_db $opt_folder $opt_verbose $opt_debug $opt_help);
+ $opt_db $opt_folder $opt_verbose $opt_debug $opt_help $opt_version);
##
## Environments
@@ -42,11 +48,12 @@ Usage: imhsync [OPTIONS]
";
@OptConfig = (
- 'db;s;;' => 'reference DB.',
- 'folder;s;;' => 'folder to be refiled.',
- 'verbose;b;;' => 'With verbose messages.',
- 'debug;d;;' => "With debug message.",
- 'help;b;;' => "Show this message.",
+ 'db;s;;' => 'reference DB',
+ 'folder;s;;' => 'folder to be refiled',
+ 'verbose;b;;' => 'With verbose messages',
+ 'debug;d;;' => "With debug message",
+ 'help;b;;' => "Display this help and exit",
+ 'version,V;b;;' => "Output version information and exit",
);
##
@@ -56,8 +63,8 @@ Usage: imhsync [OPTIONS]
init_opt(\@OptConfig);
read_cfg();
read_opt(\@ARGV); # help?
+print("${VERSION_INFORMATION}") && exit $EXIT_SUCCESS if $opt_version;
help($EXPLANATION) && exit $EXIT_SUCCESS if $opt_help;
-
debug_option($opt_debug) if $opt_debug;
##
@@ -198,7 +205,7 @@ sub my_history_open($$) {
}
unless ($db) {
- im_err "history: can not access $dbfile ($!)\n";
+ im_err "history: can not access $dbfile ($!).\n";
return -1;
}
if ($DBtype eq 'DB') {
@@ -284,6 +291,10 @@ Print debug messages when running.
Display help message and exit.
+=item I<--version>
+
+Output version information and exit.
+
=back
=head1 COPYRIGHT