diff options
author | Norbert Preining <preining@logic.at> | 2008-07-10 09:35:01 +0000 |
---|---|---|
committer | Norbert Preining <preining@logic.at> | 2008-07-10 09:35:01 +0000 |
commit | aad6173a53f98f1a4e22b856f31b89bc57c2b5e1 (patch) | |
tree | 620a8d32e1486389492660bb025ccd41cabb1ee7 | |
parent | 82836ecda2844cc3fe58c1c51ccb75df977fc05b (diff) |
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
-rwxr-xr-x | Master/texmf/scripts/texlive/texconf.tlu | 16 |
1 files changed, 9 insertions, 7 deletions
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 |