diff options
author | Daniel Friesel <derf@derf.homelinux.org> | 2010-06-14 23:01:53 +0200 |
---|---|---|
committer | Daniel Friesel <derf@derf.homelinux.org> | 2010-06-14 23:01:53 +0200 |
commit | e1e7a58aa6983261757affa1b146d6ce20742a69 (patch) | |
tree | 10740266236576a6bf2b9ea7ef7ca85566d10856 /bin/comirror-setup | |
parent | 3ea8bf369dd252756b0e20966c5deaf4c617b3b6 (diff) |
Add --version switch
Diffstat (limited to 'bin/comirror-setup')
-rwxr-xr-x | bin/comirror-setup | 12 |
1 files changed, 12 insertions, 0 deletions
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; } |