diff options
author | Norbert Preining <preining@logic.at> | 2008-01-08 07:15:19 +0000 |
---|---|---|
committer | Norbert Preining <preining@logic.at> | 2008-01-08 07:15:19 +0000 |
commit | 9f848d276155dd55b6281b553fc3c80271564dda (patch) | |
tree | a2984bd0abed4816a9ec8cd83cf34b3b6383e860 /Master/tlpkg | |
parent | 3c939f3ef8fa29d700a93eb2eebedcb6818a2ed7 (diff) |
hope to make these scripts work on win32
git-svn-id: svn://tug.org/texlive/trunk@6129 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/tlpkg')
-rwxr-xr-x | Master/tlpkg/bin/generate-fmtutil | 12 | ||||
-rwxr-xr-x | Master/tlpkg/bin/generate-language | 10 | ||||
-rwxr-xr-x | Master/tlpkg/bin/generate-updmap | 22 |
3 files changed, 16 insertions, 28 deletions
diff --git a/Master/tlpkg/bin/generate-fmtutil b/Master/tlpkg/bin/generate-fmtutil index 1cb92eaa0d6..80ba9cbe0ec 100755 --- a/Master/tlpkg/bin/generate-fmtutil +++ b/Master/tlpkg/bin/generate-fmtutil @@ -18,6 +18,7 @@ use strict; use TeXLive::TLConfig; use TeXLive::TLPOBJ; use TeXLive::TLPDB; +use TeXLive::TLUtils qw/kpsewhich/; use Getopt::Long; use Pod::Usage; use File::Path; @@ -39,13 +40,10 @@ exit (&main ()); sub main { # get the db. - my $Master = abs_path("$mydir/../.."); + my $Master = abs_path("$mydir/../.."); my $tlpdb = TeXLive::TLPDB->new ("root" => "$Master"); - - my $sysvar = `kpsewhich -expand-var '\$TEXMFSYSVAR'`; chomp($sysvar); - my $tmflocal = `kpsewhich -expand-var '\$TEXMFLOCAL'`; chomp($tmflocal); - $dest || ($dest = "$sysvar/web2c/fmtutil.cnf"); - $localconf || ($localconf = "$tmflocal/web2c/fmtutil-local.cnf"); + $dest || ($dest = kpsewhich("TEXMFSYSVAR") . "/web2c/fmtutil.cnf"); + $localconf || ($localconf = kpsewhich("TEXMFLOCAL") . "/web2c/fmtutil-local.cnf"); print "writing fmtutil.cnf data to $dest\n"; TeXLive::TLUtils::create_fmtutil($tlpdb, $dest, $localconf); } @@ -95,4 +93,4 @@ GNU General Public License Version 2 or later. ### tab-width: 2 ### indent-tabs-mode: nil ### End: -# vim:set tabstop=2: # +# vim:set tabstop=2 expandtab: # diff --git a/Master/tlpkg/bin/generate-language b/Master/tlpkg/bin/generate-language index f9421fbfc50..0e3711300fd 100755 --- a/Master/tlpkg/bin/generate-language +++ b/Master/tlpkg/bin/generate-language @@ -18,6 +18,7 @@ use strict; use TeXLive::TLConfig; use TeXLive::TLPOBJ; use TeXLive::TLPDB; +use TeXLive::TLUtils qw/kpsewhich/; use Getopt::Long; use Pod::Usage; use File::Path; @@ -41,11 +42,8 @@ sub main # get the db. my $Master = abs_path("$mydir/../.."); my $tlpdb = TeXLive::TLPDB->new ("root" => "$Master"); - - my $sysvar = `kpsewhich -expand-var '\$TEXMFSYSVAR'`; chomp($sysvar); - my $tmflocal = `kpsewhich -expand-var '\$TEXMFLOCAL'`; chomp($tmflocal); - $dest || ($dest = "$sysvar/tex/generic/config/language.dat"); - $localconf || ($localconf = "$tmflocal/tex/generic/config/language-local.dat"); + $dest || ($dest = kpsewhich("TEXMFSYSVAR") . "/tex/generic/config/language.dat"); + $localconf || ($localconf = kpsewhich("TEXMFLOCAL") . "/tex/generic/config/language-local.dat"); print "writing language.dat data to $dest\n"; TeXLive::TLUtils::create_language($tlpdb, $dest, $localconf); } @@ -95,4 +93,4 @@ GNU General Public License Version 2 or later. ### tab-width: 2 ### indent-tabs-mode: nil ### End: -# vim:set tabstop=2: # +# vim:set tabstop=2 expandtab: # diff --git a/Master/tlpkg/bin/generate-updmap b/Master/tlpkg/bin/generate-updmap index 1e207e258d0..839eaabed64 100755 --- a/Master/tlpkg/bin/generate-updmap +++ b/Master/tlpkg/bin/generate-updmap @@ -18,6 +18,7 @@ use strict; use TeXLive::TLConfig; use TeXLive::TLPOBJ; use TeXLive::TLPDB; +use TeXLive::TLUtils qw/win32/; use Getopt::Long; use Pod::Usage; use File::Path; @@ -27,9 +28,9 @@ our $mydir; our $opt_debug = 0; my $help = 0; my $dest = ""; -my $local = ""; +my $localconf = ""; -GetOptions("debug!", "dest=s" => \$dest, "local=s" => \$local, +GetOptions("debug!", "dest=s" => \$dest, "local=s" => \$localconf, "help|?" => \$help) or pod2usage(1); pod2usage(-exitstatus => 0, -verbose => 2) if $help; @@ -41,19 +42,10 @@ sub main # get the db. my $Master = abs_path("$mydir/../.."); my $tlpdb = TeXLive::TLPDB->new ("root" => "$Master"); - - if (! $dest) { - chomp (my $sysvar = `kpsewhich -expand-var '\$TEXMFSYSVAR'`); - $dest = "$sysvar/web2c/updmap.cfg"; - } - - if (! $local) { - chomp (my $tmflocal = `kpsewhich -expand-var '\$TEXMFLOCAL'`); - $local = "$tmflocal/web2c/updmap-local.cfg"; - } - + $dest || ($dest = kpsewhich("TEXMFSYSVAR") . "/web2c/updmap.cfg"); + $localconf || ($localconf = kpsewhich("TEXMFLOCAL") . "/web2c/updmap-local.cfg"); print "$0: writing new updmap.cfg to $dest\n"; - TeXLive::TLUtils::create_updmap ($tlpdb, $dest, $local); + TeXLive::TLUtils::create_updmap ($tlpdb, $dest, $localconf); } @@ -107,4 +99,4 @@ GNU General Public License Version 2 or later. ### tab-width: 2 ### indent-tabs-mode: nil ### End: -# vim:set tabstop=2: # +# vim:set tabstop=2 expandtab: # |