]> gitweb.michael.orlitzky.com - valtz.git/blobdiff - valtz
Add a man page.
[valtz.git] / valtz
diff --git a/valtz b/valtz
index 0ca0e6af003eacb7c5150c3dfb765488b84cb6ce..5ee3750b3266c15d6c105f97e9e328a759c03130 100755 (executable)
--- a/valtz
+++ b/valtz
@@ -43,19 +43,22 @@ use File::Temp qw/ tempfile /;
 use File::Copy qw/ move /;
 
 
-my $VERSION = $1 if '$Revision: 0.7 $' =~ /(\d+\.\d+)/;
-my $COPYRIGHT = '; (C) 2003 Magnus Bodin, http://x42.com/software/';
+my $VERSION = '0.8';
+
 
 $| = 1;
 my %opt;
-getopts('?fFhHiIqrRstT:x', \%opt);
+getopts('?fFhHiIqrRstT:', \%opt);
 
 
 my $FILESUFFIXREGEXP = '('.join('|', qw/
         ,v ~ .bak .log .old .swp .tmp
     /).')$';
 
+# Validation errors
 my $verrs_total = 0;
+
+# "Permission" errors with respect to what record types are allowed
 my $perrs_total = 0;
 
 
@@ -896,10 +899,10 @@ my $files = funiq(@ARGV);
 if ($opt{h} || $opt{H} || $opt{'?'})
 {
     print <<"--EOT";
-valtz $VERSION, $COPYRIGHT
+valtz $VERSION
 validates tinydns-data zone files
 Usage:
-  $0 [-hfFqrRiItTx] <file(s)>
+  $0 [-hfFqrRiItT] <file(s)>
 
   -h shows this help.
 
@@ -970,10 +973,6 @@ Usage:
      A commandline way to explicitly set the allowed recordtypes.
      This is _concatenated_ to the allowtype-allowed recordtypes.
 
-  -x Exit with non-null exit code on errors; i.e. make errors detectable by
-     e.g. shell scripts; 1 = validation error, 2 = permission error,
-     3 = combination of 1 and 2.
-
 
 
 All errors in the zonefiles are sent to STDERR.
@@ -1020,7 +1019,7 @@ All errors in the zonefiles are sent to STDERR.
 elsif (@{$files} == 0)
 {
     print <<"--EOT";
-valtz $VERSION, $COPYRIGHT
+valtz $VERSION
 validates tinydns-data zone files
 Usage:
   Simple validation:
@@ -1112,7 +1111,7 @@ else
     }
 }
 
-if ($opt{x} && ($verrs_total + $perrs_total))
+if ($verrs_total + $perrs_total)
 {
     my $exitcode = $verrs_total > 0 ? 1 : 0;
     $exitcode += $perrs_total > 0 ? 2 : 0;