aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Makefile1
-rwxr-xr-xRpmdrake/init.pm6
2 files changed, 7 insertions, 0 deletions
diff --git a/Makefile b/Makefile
index c5348fb2..4449b141 100644
--- a/Makefile
+++ b/Makefile
@@ -1,3 +1,4 @@
+# sync this with Rpmdrake/init.pm:
VERSION = 3.38
NAME = rpmdrake
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;
}
}