From d397a102a115a327cf19b194d672fba719fbfeff Mon Sep 17 00:00:00 2001 From: Norbert Preining Date: Fri, 8 Feb 2008 09:49:21 +0000 Subject: os checking in texlua code git-svn-id: svn://tug.org/texlive/trunk@6538 c570f23f-e606-0410-a88d-b1316a301751 --- Build/source/texk/texlive/generate-fmtutil | 14 +++++++++++--- Build/source/texk/texlive/generate-language | 12 ++++++++++-- Build/source/texk/texlive/generate-updmap | 12 ++++++++++-- 3 files changed, 31 insertions(+), 7 deletions(-) diff --git a/Build/source/texk/texlive/generate-fmtutil b/Build/source/texk/texlive/generate-fmtutil index bc497f26fa2..b639dad34eb 100755 --- a/Build/source/texk/texlive/generate-fmtutil +++ b/Build/source/texk/texlive/generate-fmtutil @@ -1,6 +1,6 @@ #!/usr/bin/env texlua --*-Lua-*- --- $Id: generate-updmap.fmtutil 6485 2008-02-01 20:15:06Z reinhardk $ +-- $Id: generate-fmtutil.texlua 6485 2008-02-01 20:15:06Z reinhardk $ -- Copyright (C) 2007 2008 Reinhard Kotucha, Norbert Preining -- You may freely use, modify and/or distribute this file. @@ -24,9 +24,16 @@ kpse.set_program_name(basename) TEXDIR=kpse.var_value("SELFAUTOPARENT") -os.setenv("PERL5LIB", TEXDIR.."/tlpkg/tlperl/lib") +-- if we are on win32 we have to use the shipped perl +ostype = os.getenv("OS") +perlbin="perl" +if (ostype) then + if string.find(ostype, "Windows") then + os.setenv("PERL5LIB", TEXDIR.."/tlpkg/tlperl/lib") + perlbin=TEXDIR.."/tlpkg/tlperl/bin/perl.exe" + end +end -perlbin=TEXDIR.."/tlpkg/tlperl/bin/perl.exe" script=kpse.find_file(basename..".pl", "texmfscripts") command={perlbin, script} @@ -37,3 +44,4 @@ end ret=os.spawn(command) os.exit(ret) + diff --git a/Build/source/texk/texlive/generate-language b/Build/source/texk/texlive/generate-language index 1f16e0ab345..3acd87edc46 100755 --- a/Build/source/texk/texlive/generate-language +++ b/Build/source/texk/texlive/generate-language @@ -24,9 +24,16 @@ kpse.set_program_name(basename) TEXDIR=kpse.var_value("SELFAUTOPARENT") -os.setenv("PERL5LIB", TEXDIR.."/tlpkg/tlperl/lib") +-- if we are on win32 we have to use the shipped perl +ostype = os.getenv("OS") +perlbin="perl" +if (ostype) then + if string.find(ostype, "Windows") then + os.setenv("PERL5LIB", TEXDIR.."/tlpkg/tlperl/lib") + perlbin=TEXDIR.."/tlpkg/tlperl/bin/perl.exe" + end +end -perlbin=TEXDIR.."/tlpkg/tlperl/bin/perl.exe" script=kpse.find_file(basename..".pl", "texmfscripts") command={perlbin, script} @@ -37,3 +44,4 @@ end ret=os.spawn(command) os.exit(ret) + diff --git a/Build/source/texk/texlive/generate-updmap b/Build/source/texk/texlive/generate-updmap index b5ef265bd55..321b385f6b9 100755 --- a/Build/source/texk/texlive/generate-updmap +++ b/Build/source/texk/texlive/generate-updmap @@ -24,9 +24,16 @@ kpse.set_program_name(basename) TEXDIR=kpse.var_value("SELFAUTOPARENT") -os.setenv("PERL5LIB", TEXDIR.."/tlpkg/tlperl/lib") +-- if we are on win32 we have to use the shipped perl +ostype = os.getenv("OS") +perlbin="perl" +if (ostype) then + if string.find(ostype, "Windows") then + os.setenv("PERL5LIB", TEXDIR.."/tlpkg/tlperl/lib") + perlbin=TEXDIR.."/tlpkg/tlperl/bin/perl.exe" + end +end -perlbin=TEXDIR.."/tlpkg/tlperl/bin/perl.exe" script=kpse.find_file(basename..".pl", "texmfscripts") command={perlbin, script} @@ -37,3 +44,4 @@ end ret=os.spawn(command) os.exit(ret) + -- cgit v1.2.3