diff options
author | Rafael Garcia-Suarez <rgarciasuarez@mandriva.org> | 2004-07-08 09:15:55 +0000 |
---|---|---|
committer | Rafael Garcia-Suarez <rgarciasuarez@mandriva.org> | 2004-07-08 09:15:55 +0000 |
commit | f200c935f68847b0997b22a241bd1989efc352e2 (patch) | |
tree | 249847220b476e5a2712bf0cb0de313e78e69853 /urpm/args.pm | |
parent | 3b78140605cc02f73f50ad6c94bf34f3b6105aae (diff) | |
download | urpmi-f200c935f68847b0997b22a241bd1989efc352e2.tar urpmi-f200c935f68847b0997b22a241bd1989efc352e2.tar.gz urpmi-f200c935f68847b0997b22a241bd1989efc352e2.tar.bz2 urpmi-f200c935f68847b0997b22a241bd1989efc352e2.tar.xz urpmi-f200c935f68847b0997b22a241bd1989efc352e2.zip |
Add a --version flag to the urpm* tools
Diffstat (limited to 'urpm/args.pm')
-rw-r--r-- | urpm/args.pm | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/urpm/args.pm b/urpm/args.pm index 1309bda5..d9a58286 100644 --- a/urpm/args.pm +++ b/urpm/args.pm @@ -34,6 +34,7 @@ sub import { my %options_spec = ( urpmi => { + "version" => sub { require urpm; print "$tool $urpm::VERSION\n"; exit(0) }, "help|h" => sub { if (defined &::usage) { ::usage() } else { die "No help defined\n" } }, @@ -268,20 +269,20 @@ my %options_spec = ( # common options setup -foreach my $k ("help|h", "no-locales", "test!", "force", "root=s", "use-distrib=s", +foreach my $k ("help|h", "version", "no-locales", "test!", "force", "root=s", "use-distrib=s", "parallel=s") { $options_spec{urpme}{$k} = $options_spec{urpmi}{$k}; } -foreach my $k ("help|h", "no-locales", "update", "media|mediums=s", +foreach my $k ("help|h", "version", "no-locales", "update", "media|mediums=s", "excludemedia|exclude-media=s", "sortmedia|sort-media=s", "synthesis=s", "env=s") { $options_spec{urpmf}{$k} = $options_spec{urpmi}{$k}; } -foreach my $k ("help|h", "wget", "curl", "proxy=s", "proxy-user=s") { +foreach my $k ("help|h", "version", "wget", "curl", "proxy=s", "proxy-user=s") { $options_spec{'urpmi.update'}{$k} = $options_spec{urpmq}{$k} = $options_spec{urpmi}{$k}; } |