From 803e1c5c0327cab100c405c1a594f5b687db4714 Mon Sep 17 00:00:00 2001 From: Rafael Garcia-Suarez Date: Wed, 28 Sep 2005 14:29:58 +0000 Subject: Use Pod::Usage --- genhdlist | 73 +++++++++++++++++++++++++++++++++++++++++++++++++++------------ 1 file changed, 60 insertions(+), 13 deletions(-) (limited to 'genhdlist') diff --git a/genhdlist b/genhdlist index bd90212..f382303 100644 --- a/genhdlist +++ b/genhdlist @@ -24,32 +24,24 @@ use URPM::Build; use File::Find (); use File::Path; use Getopt::Long; +use Pod::Usage; my ($noclean, $nooutput, $dontdie, $suffix, $dest) = (0, 0, 0, "", ""); my $tmpdir = (-d "$ENV{HOME}/tmp" ? "$ENV{HOME}/tmp" : $ENV{TMPDIR} || "/tmp") . "/.build_hdlist"; -sub usage { - print < 1 }); } GetOptions( 'dest=s' => \$dest, 'headersdir=s' => \$tmpdir, - 'help|h' => sub { usage(); exit }, + 'help|h' => sub { usage(); exit 0 }, nobadrpm => \$dontdie, noclean => \$noclean, s => \$nooutput, 'suffix=s' => \$suffix, + 'v|version' => sub { warn "$0 version $VERSION\n"; exit 0 }, ); my $urpm = new URPM; @@ -125,3 +117,58 @@ $urpm->build_synthesis( ); __END__ + +=head1 NAME + +genhdlist - generates an hdlist file + +=head1 SYNOPSIS + + gendistrib [options] dir [dir...] + +=head1 OPTIONS + +=over 4 + +=item --headersdir dir + +Put temporary files in directory. + +=item --dest dir + +Build index from this directory. + +=item --nobadrpm + +Do not abort on bad rpms. + +=item --noclean + +Keep cache files. + +=item --suffix SUFFIX + +Put a suffix on hdlist names. + +=item -s + +Silent mode. + +=back + +=head1 DESCRIPTION + +=head1 SEE ALSO + +gendistrib(1) + +=head1 COPYRIGHT + +Copyright (C) 1999-2005 Mandrakesoft + +This program is free software; you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation; either version 2, or (at your option) +any later version. + +=cut -- cgit v1.2.1