Update of /cvsroot/fink/scripts/pdb
In directory sc8-pr-cvs5.sourceforge.net:/tmp/cvs-serv13412
Modified Files:
dump
Log Message:
Add --help and a bit of usage info
Index: dump
===================================================================
RCS file: /cvsroot/fink/scripts/pdb/dump,v
retrieving revision 1.29
retrieving revision 1.30
diff -u -d -r1.29 -r1.30
--- dump 4 Apr 2006 22:48:49 -0000 1.29
+++ dump 15 Jun 2006 21:42:42 -0000 1.30
@@ -34,7 +34,7 @@
use Getopt::Long;
### get parameters
-my ($distribution, $tree, $release, $architecture);
+my ($distribution, $tree, $release, $architecture, $wanthelp);
# process command-line
if (@ARGV && $ARGV[0] =~ /^-/) {
@@ -43,9 +43,11 @@
'distribution=s' => \$distribution,
'tree=s' => \$tree,
'release=s' => \$release,
- 'architecture=s' => \$architecture
+ 'architecture=s' => \$architecture,
+ 'help' => \$wanthelp,
)
- or die "$0: Bad syntax\n";
+ or &die_with_usage;
+ &die_with_usage if $wanthelp;
} else {
# no getopt flag, so use old positional-parameter syntax
($distribution, $tree, $release) = @_;
@@ -199,5 +201,20 @@
rm_f $treelink or print "Could not remove $treelink\n";
}
+sub die_with_usage {
+ die <<EOMSG;
+Usage: $0 [options]
+
+Options:
+ --distribution
+ --tree
+ --release
+ --architecture
+ --help
+EOMSG
+}
+
### eof
exit 0;
+
+
_______________________________________________
Fink-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/fink-commits