[Po4a-commits] po4a po4a,1.25,1.26 po4a-gettextize,1.29,1.30 po4a-normalize,1.23,1.24 po4a-translate,1.35,1.36 po4a-updatepo,1.32,1.33

Danilo Piazzalunga po4a-devel@lists.alioth.debian.org
Fri, 04 Mar 2005 16:40:43 +0000


Update of /cvsroot/po4a/po4a
In directory haydn:/tmp/cvs-serv26629

Modified Files:
	po4a po4a-gettextize po4a-normalize po4a-translate 
	po4a-updatepo 
Log Message:
Change again the usage messages behavior. Make scripts return 0 when
--help is requested, and 2 on usage error.


Index: po4a-normalize
===================================================================
RCS file: /cvsroot/po4a/po4a/po4a-normalize,v
retrieving revision 1.23
retrieving revision 1.24
diff -u -d -r1.23 -r1.24
--- po4a-normalize	3 Mar 2005 20:08:54 -0000	1.23
+++ po4a-normalize	4 Mar 2005 16:40:40 -0000	1.24
@@ -122,11 +122,11 @@
 	'verbose|v'    => \$verbose,
 	'debug|d'      => \$debug,
 	'version|V'    => \&show_version
-) or pod2usage(1);
+) or pod2usage();
 
-$help && pod2usage (1);
+$help && pod2usage (-verbose => 1, -exitval => 0);
 $help_fmt && Locale::Po4a::Chooser::list(0);
-pod2usage (0) unless scalar @ARGV == 1;
+pod2usage () unless scalar @ARGV == 1;
 
 my %options = (
     "verbose" => $verbose,

Index: po4a-translate
===================================================================
RCS file: /cvsroot/po4a/po4a/po4a-translate,v
retrieving revision 1.35
retrieving revision 1.36
diff -u -d -r1.35 -r1.36
--- po4a-translate	3 Mar 2005 20:08:54 -0000	1.35
+++ po4a-translate	4 Mar 2005 16:40:40 -0000	1.36
@@ -199,13 +199,13 @@
 	'keep|k=s'      => \$threshold,
 
 	'version|V'     => \&show_version
-) or pod2usage(1);
+) or pod2usage();
 
-$help && pod2usage(1);
+$help && pod2usage(-verbose => 1, -exitval => 0);
 $help_fmt && Locale::Po4a::Chooser::list(0);
 
-(defined($master_filename) && length($master_filename))||pod2usage(0);
-(defined($po_filename)     && length($po_filename))    ||pod2usage(1);
+(defined($master_filename) && length($master_filename))||pod2usage();
+(defined($po_filename)     && length($po_filename))    ||pod2usage();
 -e $master_filename || die wrap_msg(gettext("File %s does not exist."), $master_filename);
 -e $po_filename || die wrap_msg(gettext("File %s does not exist."), $po_filename);
 

Index: po4a
===================================================================
RCS file: /cvsroot/po4a/po4a/po4a,v
retrieving revision 1.25
retrieving revision 1.26
diff -u -d -r1.25 -r1.26
--- po4a	3 Mar 2005 20:08:54 -0000	1.25
+++ po4a	4 Mar 2005 16:40:40 -0000	1.26
@@ -233,10 +233,10 @@
 	'split|s'       => \$split,
 	'keep|k=s'      => \$threshold,
 	'version|V'     => \&show_version
-) or pod2usage(1);
+) or pod2usage();
 
 # Argument check
-$help && pod2usage (1);
+$help && pod2usage (-verbose => 1, -exitval => 0);
 
 my ($verbose) = (scalar @verbose);
 $verbose = 1 if $debug;
@@ -253,7 +253,7 @@
     }
 }
 
-my $config_file= shift(@ARGV) || pod2usage(0);
+my $config_file= shift(@ARGV) || pod2usage();
 # Check file existence
 -e $config_file || die wrap_msg(gettext("File %s does not exist."), $config_file);
 

Index: po4a-updatepo
===================================================================
RCS file: /cvsroot/po4a/po4a/po4a-updatepo,v
retrieving revision 1.32
retrieving revision 1.33
diff -u -d -r1.32 -r1.33
--- po4a-updatepo	3 Mar 2005 20:08:54 -0000	1.32
+++ po4a-updatepo	4 Mar 2005 16:40:41 -0000	1.33
@@ -157,11 +157,11 @@
 	   'verbose|v'   => \$verbose,
 	   'debug|d'     => \$debug,
 	   'version|V'   => \&show_version)
-    or pod2usage(1);
+    or pod2usage();
 
-$help && pod2usage (1);
+$help && pod2usage (-verbose => 1, -exitval => 0);
 $help_fmt && Locale::Po4a::Chooser::list(0);
-pod2usage (0) if scalar @masterfiles < 1 || scalar @pofiles < 1;
+pod2usage () if scalar @masterfiles < 1 || scalar @pofiles < 1;
 
 my %options = (
     "verbose" => $verbose,

Index: po4a-gettextize
===================================================================
RCS file: /cvsroot/po4a/po4a/po4a-gettextize,v
retrieving revision 1.29
retrieving revision 1.30
diff -u -d -r1.29 -r1.30
--- po4a-gettextize	3 Mar 2005 20:08:54 -0000	1.29
+++ po4a-gettextize	4 Mar 2005 16:40:40 -0000	1.30
@@ -176,12 +176,12 @@
 	'verbose|v'     => \$verbose,
 	'debug|d'       => \$debug,
 	'version|V'     => \&show_version
-) or pod2usage(1);
+) or pod2usage();
 
 # Argument check
-$help && pod2usage (1);
+$help && pod2usage (-verbose => 1, -exitval => 0);
 $help_fmt && Locale::Po4a::Chooser::list(0);
-pod2usage (0) if (scalar @ARGV > 1) || 
+pod2usage () if (scalar @ARGV > 1) || 
     (!defined($masterfile)) || (!length($masterfile));
 
 my %options = (