From aad6173a53f98f1a4e22b856f31b89bc57c2b5e1 Mon Sep 17 00:00:00 2001 From: Norbert Preining Date: Thu, 10 Jul 2008 09:35:01 +0000 Subject: texconf.tlu: texlua now expands ~, but keep the code and do after match git-svn-id: svn://tug.org/texlive/trunk@9424 c570f23f-e606-0410-a88d-b1316a301751 --- Master/texmf/scripts/texlive/texconf.tlu | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) (limited to 'Master') diff --git a/Master/texmf/scripts/texlive/texconf.tlu b/Master/texmf/scripts/texlive/texconf.tlu index 3f00b0ee51f..b9cb3f7e934 100755 --- a/Master/texmf/scripts/texlive/texconf.tlu +++ b/Master/texmf/scripts/texlive/texconf.tlu @@ -61,14 +61,16 @@ if (sys) then os.setenv('TEXMFVAR', texmfsysvar) else texmfconfig=kpse.var_value('TEXMFCONFIG') --- workaround for texlua, new kpathsea which expands '~' not --- integrated yet. - if os.type == 'windows' then - home = os.getenv('USERPROFILE') - else - home = os.getenv('HOME') + if string.match(texmfconfig, '^~') then + -- workaround for old texlua, new kpathsea which expands '~' not + -- integrated yet. + if os.type == 'windows' then + home = os.getenv('USERPROFILE') + else + home = os.getenv('HOME') + end + texmfconfig = string.gsub(texmfconfig, '^~', home) end - texmfconfig = string.gsub(texmfconfig, '^~', home) end -- cgit v1.2.3