X-Git-Url: http://git.hungrycats.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=hacks%2Fxml2man.pl;h=d7d4e32355031deedd88c1aeca5289516fc95ce2;hb=c85f503f5793839a6be4c818332aca4a96927bb2;hp=c0090711fa52d579ce0bacc16fc6c08c20349941;hpb=4ade52359b6eba3621566dac79793a33aa4c915f;p=xscreensaver diff --git a/hacks/xml2man.pl b/hacks/xml2man.pl index c0090711..d7d4e323 100755 --- a/hacks/xml2man.pl +++ b/hacks/xml2man.pl @@ -1,5 +1,5 @@ #!/usr/bin/perl -w -# Copyright © 2002-2013 Jamie Zawinski +# Copyright © 2002-2014 Jamie Zawinski # # Permission to use, copy, modify, distribute, and sell this software and its # documentation for any purpose is hereby granted without fee, provided that @@ -24,7 +24,7 @@ use strict; use Text::Wrap; my $progname = $0; $progname =~ s@.*/@@g; -my $version = q{ $Revision: 1.4 $ }; $version =~ s/^[^0-9]+([0-9.]+).*$/$1/; +my ($version) = ('$Revision: 1.7 $' =~ m/\s(\d[.\d]+)\s/s); my $verbose = 0; @@ -78,6 +78,7 @@ my $man_suffix = (".SH ENVIRONMENT\n" . sub xml2man($) { my ($exe) = @_; + $exe =~ s/\.xml$//s; my $cfgdir = (-d "config" ? "config" : "../config"); my $xml = "$cfgdir/$exe.xml"; my $man = "$exe.man"; @@ -180,6 +181,8 @@ sub xml2man($) { } elsif (m@^<_description>\s*(.*)\s*@) { $desc = $1; + } elsif (m@^