diff options
author | Thierry Vignaud <tv@mandriva.org> | 2007-03-06 12:12:54 +0000 |
---|---|---|
committer | Thierry Vignaud <tv@mandriva.org> | 2007-03-06 12:12:54 +0000 |
commit | baddc07a805f9411ccc102d87c75489369a1365e (patch) | |
tree | 5e0b8526d2dfbed05aa24bb540c468c4d526a658 /Rpmdrake/init.pm | |
parent | 12b54be5191e62bd5987ec25060fd28aae6b948e (diff) | |
download | rpmdrake-baddc07a805f9411ccc102d87c75489369a1365e.tar rpmdrake-baddc07a805f9411ccc102d87c75489369a1365e.tar.gz rpmdrake-baddc07a805f9411ccc102d87c75489369a1365e.tar.bz2 rpmdrake-baddc07a805f9411ccc102d87c75489369a1365e.tar.xz rpmdrake-baddc07a805f9411ccc102d87c75489369a1365e.zip |
display version number if --version is given (#28858)
Diffstat (limited to 'Rpmdrake/init.pm')
-rwxr-xr-x | Rpmdrake/init.pm | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/Rpmdrake/init.pm b/Rpmdrake/init.pm index dee521cd..a8a3c421 100755 --- a/Rpmdrake/init.pm +++ b/Rpmdrake/init.pm @@ -50,6 +50,7 @@ N(" --pkg-nosel=pkg1,.. show only these packages"), N(" --pkg-sel=pkg1,.. preselect these packages"), N(" --root force to run as root"), N(" --search=pkg run search for \"pkg\""), +N(" --version output version information and exit"), "" ); exit 0; @@ -78,6 +79,7 @@ if ($collation_locale) { $collation_locale =~ /UTF-8/ or setlocale(LC_COLLATE, "$collation_locale.UTF-8"); } +my $version = '3.38'; our %options; foreach (@ARGV) { /^-?-(\S+)$/ or next; @@ -87,6 +89,10 @@ foreach (@ARGV) { my @values = split /,/, $values; $options{$name} = \@values if @values; } else { + if ($val eq 'version') { + print "$0 $version\n"; + exit(0); + } $options{$val} = 1; } } |