diff options
author | Rafael Garcia-Suarez <rgarciasuarez@mandriva.org> | 2006-01-10 09:24:13 +0000 |
---|---|---|
committer | Rafael Garcia-Suarez <rgarciasuarez@mandriva.org> | 2006-01-10 09:24:13 +0000 |
commit | f181e51ca1035cbdc57f00479074f724c4a29c6f (patch) | |
tree | 00304026c59707ebc778e8d025daa950d7e6b54c | |
parent | 38807d772dbc9d1f41a99d10fab26a83c0547d41 (diff) | |
download | urpmi-f181e51ca1035cbdc57f00479074f724c4a29c6f.tar urpmi-f181e51ca1035cbdc57f00479074f724c4a29c6f.tar.gz urpmi-f181e51ca1035cbdc57f00479074f724c4a29c6f.tar.bz2 urpmi-f181e51ca1035cbdc57f00479074f724c4a29c6f.tar.xz urpmi-f181e51ca1035cbdc57f00479074f724c4a29c6f.zip |
Display usage if no rpm name, nor auto-select was given
-rwxr-xr-x | urpmi | 6 |
1 files changed, 4 insertions, 2 deletions
@@ -71,7 +71,7 @@ delete @ENV{qw(ENV BASH_ENV IFS CDPATH)}; $ENV{HOME} ||= "/root"; $ENV{USER} ||= "root"; -sub usage { +sub usage () { print N("urpmi version %s Copyright (C) 1999-2005 Mandriva. This is free software and may be redistributed under the terms of the GNU GPL. @@ -149,7 +149,6 @@ usage: # Parse command line my $command_line = join " ", @ARGV; -@ARGV or usage; my @ARGVcopy; # keep a copy, in case we have to restart # Expand *.urpmi arguments @@ -171,6 +170,9 @@ if (grep { $_ eq '--restricted' } @ARGV) { # Parse command line options urpm::args::parse_cmdline(urpm => $urpm); +# Verify that arguments were given +@ARGV || $auto_select or usage; + # Process the rest of the arguments while (defined($_ = shift @ARGV)) { if (/\.rpm$/) { |