summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/doc/generic/vntex/vntex-update-maps
diff options
context:
space:
mode:
authorManuel Pégourié-Gonnard <mpg@elzevir.fr>2008-06-02 14:59:05 +0000
committerManuel Pégourié-Gonnard <mpg@elzevir.fr>2008-06-02 14:59:05 +0000
commit26d42a847110686f2469b99b4142d29d3cdc5578 (patch)
tree74f12d52e696ea934569d0fd07d51f4d2ce01beb /Master/texmf-dist/doc/generic/vntex/vntex-update-maps
parent36623cb81fa76c260798589725995fe17592d6ca (diff)
vntex v3.1.5 2008/06/01 (from tds.zip)
git-svn-id: svn://tug.org/texlive/trunk@8488 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/doc/generic/vntex/vntex-update-maps')
-rw-r--r--Master/texmf-dist/doc/generic/vntex/vntex-update-maps130
1 files changed, 130 insertions, 0 deletions
diff --git a/Master/texmf-dist/doc/generic/vntex/vntex-update-maps b/Master/texmf-dist/doc/generic/vntex/vntex-update-maps
new file mode 100644
index 00000000000..9e7f6f97b74
--- /dev/null
+++ b/Master/texmf-dist/doc/generic/vntex/vntex-update-maps
@@ -0,0 +1,130 @@
+#!/usr/bin/env perl
+#
+# vntex-3.1.7
+#
+# vntex-update-maps
+#
+# Copyright 2007 Reinhard Kotucha <reinhard.kotucha@web.de>
+#
+# This work may be distributed and/or modified under the
+# conditions of the LaTeX Project Public License, either version 1.3
+# of this license or (at your option) any later version.
+# The latest version of this license is in
+# http://www.latex-project.org/lppl.txt
+#
+# The current maintainer is Reinhard Kotucha.
+
+$^W=1;
+
+use Getopt::Long;
+$Getopt::Long::autoabbrev=0;
+
+($basename=$0)=~s/.*\///;
+
+sub usage {
+ print <<"EOF";
+Usage:
+
+ $basename [-h] [-n] -home|-sys
+
+ $basename adds font map files to updmap.cfg and
+ executes updmap in order to create the font databases.
+
+ You have to use the -home option if you extracted VnTeX
+ to TEXMFHOME and you have to use the -sys option if you
+ extracted VnTeX to TEXMFLOCAL
+
+ $basename -help will tell you the content of the
+ variables TEXMFHOME and TEXMFLOCAL.
+
+ Options:
+
+ -h|--help Print this message.
+
+ -sys Run updmap-sys.
+
+ -home Run updmap.
+
+ -n Print the commands that would be executed, but
+ do not execute them.
+
+EOF
+;
+}
+
+
+unless (@ARGV) { usage and exit 1 }
+
+GetOptions
+ "n",
+ "sys",
+ "home",
+ "help|h";
+
+
+sub expand_var {
+ my $var=shift;
+
+ if ($^O=~/^MSWin(32|64)$/i) {
+ open KPSEWHICH, 'kpsewhich --expand-var=$' . "$var |";
+ } else {
+ open KPSEWHICH, 'kpsewhich --expand-var=\$' . "$var |";
+ }
+ while (<KPSEWHICH>) {
+ return "$_";
+ chop;
+ }
+ close KPSEWHICH;
+}
+
+
+if ($opt_help) {
+ usage;
+ print " TEXMFHOME=", expand_var 'TEXMFHOME';
+ print "\n";
+ print " TEXMFLOCAL=",expand_var 'TEXMFLOCAL';
+ print "\n";
+ exit 0;
+}
+
+$chicken_mode=($opt_n)? 1:0;
+
+if ($opt_home) {
+ $sys=0;
+} elsif ($opt_sys) {
+ $sys=1;
+} else {
+ die "No target specified. Valid arguments: -home or -sys.\n\n"
+ . "Run: perl $basename -help\n\n";
+}
+
+$updmap_cmd=($sys)? "updmap-sys":"updmap";
+
+while (<DATA>) {
+ last if /^__/;
+ next if /^\s*$/;
+ s/\@UPDMAP\@/$updmap_cmd/;
+ @command=split " ", $_;
+ print "@command\n";
+ system @command unless $chicken_mode;
+}
+
+print "$updmap_cmd\n";
+system "$updmap_cmd" unless $chicken_mode;
+
+__DATA__
+@UPDMAP@ --nomkmap --nohash --disable vnr.map
+@UPDMAP@ --nomkmap --nohash --enable MixedMap vnrtext.map
+@UPDMAP@ --nomkmap --nohash --enable MixedMap vnrother.map
+@UPDMAP@ --nomkmap --nohash --enable Map urwvn.map
+@UPDMAP@ --nomkmap --nohash --enable Map chartervn.map
+@UPDMAP@ --nomkmap --nohash --enable Map mscorevn.map
+@UPDMAP@ --nomkmap --nohash --enable Map arevvn.map
+@UPDMAP@ --nomkmap --nohash --enable Map classicovn.map
+@UPDMAP@ --nomkmap --nohash --enable Map cmbrightvn.map
+@UPDMAP@ --nomkmap --nohash --enable Map comicvn.map
+@UPDMAP@ --nomkmap --nohash --enable Map concretevn.map
+@UPDMAP@ --nomkmap --nohash --enable Map garamondvn.map
+@UPDMAP@ --nomkmap --nohash --enable Map grotesqvn.map
+@UPDMAP@ --nomkmap --nohash --enable Map vntopia.map
+@UPDMAP@ --nomkmap --nohash --enable Map txttvn.map