From c6887372e72ba7c1c7afda798a2f4ad83b901676 Mon Sep 17 00:00:00 2001 From: Rafael Garcia-Suarez Date: Thu, 29 Sep 2005 16:08:09 +0000 Subject: Use Pod::Usage --- dumpdistribconf | 55 +++++++++++++++++++++++++++++++++++++++++++------------ 1 file changed, 43 insertions(+), 12 deletions(-) diff --git a/dumpdistribconf b/dumpdistribconf index 5ea82b2..fcb6e57 100755 --- a/dumpdistribconf +++ b/dumpdistribconf @@ -1,28 +1,24 @@ #!/usr/bin/perl -# $Id$ +(our $VERSION) = q$Id$ =~ /(\d+\.\d+)/; use strict; use Getopt::Long; use Distribconf::Build; +use Pod::Usage; -sub usage { - print STDERR < 1 }); + exit 0; +} my ($out, $outputtype) = (\*STDOUT, 'm'); GetOptions( h => sub { $outputtype = 'h' }, m => sub { $outputtype = 'm' }, d => sub { undef $out }, + 'v|version' => sub { warn "$0 version $VERSION\n"; exit 0 }, + 'h|help' => \&usage, ); @ARGV or usage; @@ -42,3 +38,38 @@ foreach (@ARGV) { } __END__ + +=head1 NAME + +dumpdistribconf - dumps a media.cfg from a distribution tree + +=head1 SYNOPSIS + + dumpdistribconf [-h|-m] [-d] path [path...] + +=head1 DESCRIPTION + +This will dump a F (or an F file if B<-h> is +specified) from a Mandriva Linux distribution tree. By default +it's dumped to the standard output. + +=head1 OPTIONS + +=over 4 + +=item B<-h> + +Dump an F file. + +=item B<-m> + +Dump a F file (default) + +=item B<-d> + +Instead of writing to the standard output, write to a file placed in the +standard location (e.g. F<< /media/media_info/media.cfg >>). + +=back + +=cut -- cgit v1.2.1