diff options
author | Norbert Preining <preining@logic.at> | 2010-04-09 04:01:42 +0000 |
---|---|---|
committer | Norbert Preining <preining@logic.at> | 2010-04-09 04:01:42 +0000 |
commit | 4f91a0709b6284614a37874b2f99623165ee9163 (patch) | |
tree | b02d2fd251df4f00eae5cbfc43467ba8febc5fe2 /Master/texmf | |
parent | a474739a83ef23f37c3b32b3ce9d73f983373c0a (diff) |
fix tlmgr write_config_file for missing dir
git-svn-id: svn://tug.org/texlive/trunk@17769 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf')
-rwxr-xr-x | Master/texmf/scripts/texlive/tlmgr.pl | 22 |
1 files changed, 12 insertions, 10 deletions
diff --git a/Master/texmf/scripts/texlive/tlmgr.pl b/Master/texmf/scripts/texlive/tlmgr.pl index 830ad9e2b03..407281504bd 100755 --- a/Master/texmf/scripts/texlive/tlmgr.pl +++ b/Master/texmf/scripts/texlive/tlmgr.pl @@ -4319,17 +4319,19 @@ sub load_config_file sub write_config_file { chomp (my $TEXMFCONFIG = `kpsewhich -var-value=TEXMFCONFIG`); - my $fn = "$TEXMFCONFIG/tlmgr/config"; - if (-r $fn) { - if (!open(TLC, ">$fn")) { - tlwarn("Cannot open $fn for writing: $!"); - return; - } - for my $k (keys %config) { - print TLC "$k = $config{$k}\n"; - } - close(TLC); + my $dn = "$TEXMFCONFIG/tlmgr"; + my $fn = "$dn/config"; + if (! -d $dn) { + TeXLive::TLUtils::mkdirhier($dn); + } + if (!open(TLC, ">$fn")) { + tlwarn("Cannot open $fn for writing: $!"); + return; + } + for my $k (keys %config) { + print TLC "$k = $config{$k}\n"; } + close(TLC); } # if the packagelog variable is set then write to PACKAGELOG filehandle |