Procházet zdrojové kódy

dpkg-checkbuilddeps: Add a --version option

Guillem Jover před 16 roky
rodič
revize
24d7f79135
3 změnil soubory, kde provedl 12 přidání a 0 odebrání
  1. 1 0
      debian/changelog
  2. 3 0
      man/dpkg-checkbuilddeps.1
  3. 8 0
      scripts/dpkg-checkbuilddeps.pl

+ 1 - 0
debian/changelog

@@ -7,6 +7,7 @@ dpkg (1.15.6) UNRELEASED; urgency=low
   * Handle argument parsing in dpkg-checkbuilddeps and dpkg-scanpackages
     in a way consistent with the rest of the tools.
   * Recognize --help in addition to -h in dpkg-checkbuilddeps.
+  * Add a --version option to dpkg-checkbuilddeps.
 
   [ Updated man page translations ]
   * Swedish (Peter Krefting).

+ 3 - 0
man/dpkg-checkbuilddeps.1

@@ -33,6 +33,9 @@ Use the given build dependencies/conflicts instead of those contained in the
 .TP
 .BR \-h ", " \-\-help
 Show the usage message and exit.
+.TP
+.BR \-\-version
+Show the version and exit.
 .
 .SH AUTHOR
 Copyright \(co 2001 Joey Hess

+ 8 - 0
scripts/dpkg-checkbuilddeps.pl

@@ -31,6 +31,12 @@ use Dpkg::Control::Info;
 
 textdomain("dpkg-dev");
 
+sub version()
+{
+	printf(_g("Debian %s version %s.\n"), $progname, $version);
+	exit(0);
+}
+
 sub usage {
 	printf _g(
 "Usage: %s [<option> ...] [<control-file>]
@@ -45,6 +51,7 @@ Options:
   --admindir=<directory>
                  change the administrative directory.
   -h, --help     show this help message.
+      --version  show the version.
 "), $progname;
 }
 
@@ -53,6 +60,7 @@ my $want_help=0;
 my ($bd_value, $bc_value);
 if (!GetOptions('B' => \$binary_only,
                 'help|h' => \$want_help,
+                'version' => \&version,
                 'd=s' => \$bd_value,
                 'c=s' => \$bc_value,
                 'admindir=s' => \$admindir)) {