diff options
-rwxr-xr-x | Master/tlpkg/dev/updmap.pl | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/Master/tlpkg/dev/updmap.pl b/Master/tlpkg/dev/updmap.pl index 84a71af49be..728b30f5211 100755 --- a/Master/tlpkg/dev/updmap.pl +++ b/Master/tlpkg/dev/updmap.pl @@ -2,9 +2,10 @@ ############################################################################### # updmap: utility to maintain map files for outline fonts. # -# Thomas Esser, (C) 2002. Public domain. +# Thomas Esser, (C) 2002. # Fabrice Popineau, for the Perl version. -# +# Anyone may freely use, modify, and/or distribute this file, without +# limitation. ############################################################################### # $Id$ BEGIN { @@ -13,13 +14,7 @@ BEGIN { unshift (@INC, "$TEXMFROOT/tlpkg"); } -my $svnrev = '$Revision$'; -my $revision; -if ($svnrev =~ m/: ([0-9]+) /) { - $revision = "rev. $1"; -} else { - $revision = "revision number unknown"; -} +my $version = '$Id$'; use strict; use TeXLive::TLUtils qw(mkdirhier mktexupd win32); @@ -243,6 +238,12 @@ sub progname { } } +# return program name + version string. +sub version { + my $ret = sprintf "%s version %s", &progname(), $version; + return $ret; +} + ############################################################################### # equalize_file(filename[, comment_char]) # read a file and return its processed content as a string. @@ -819,7 +820,8 @@ sub processOptions { "showoptions=s" => \@showoptions, "nohash" => \$nohash, "nomkmap" => \$nomkmap, - "version" => sub {printf "%s, %s", &progname(), $revision; exit(0)}, + "version" => sub { print &version() . "\n"; exit(0) }, + "n|dry-run" => \$dry_run, "copy" => \$copy, "h|help" => \$opt_help)) { @@ -943,9 +945,9 @@ sub mkMaps { open LOG, ">$logfile" or die "Can't open \"$logfile\""; $writelog=1; - print LOG "This is updmap, $revision\n"; + print LOG &version() . "\n"; printf LOG "%s\n\n", scalar localtime(); - print LOG "Using config file \"$cnfFile\".\n"; + print LOG "Using config file \"$cnfFile\".\n"; } sub wlog () { my $str=shift; @@ -1162,8 +1164,6 @@ sub main { &initVars; &processOptions; - print "This is updmap, $revision\n" if (! $quiet); - if (@showoptions) { &showOptions(@showoptions); exit 0; |