From e1e7a58aa6983261757affa1b146d6ce20742a69 Mon Sep 17 00:00:00 2001 From: Daniel Friesel Date: Mon, 14 Jun 2010 23:01:53 +0200 Subject: Add --version switch --- bin/comirror-setup | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'bin/comirror-setup') diff --git a/bin/comirror-setup b/bin/comirror-setup index d554473..6bdbbe9 100755 --- a/bin/comirror-setup +++ b/bin/comirror-setup @@ -26,7 +26,14 @@ my @opts = ( 'Try downloading links instead of images matching image_re first?', 0, ], + [ + 'version', + q{}, + undef, + 0, + ], ); +my $version = '0.0-git'; local $| = 1; @@ -66,6 +73,11 @@ sub parse_or_ask_options { GetOptions($conf, map { $_->[0] . $_->[1] } @opts); +if ($conf->{'version'}) { + say "comirror version $version"; + exit 0; +} + if (not -t STDOUT) { $conf->{'batch'} = 1; } -- cgit v1.2.3