[tex-live] Using a --profile and relative TEXDIR
Norbert Preining
preining at logic.at
Thu Sep 24 15:20:09 CEST 2015
Hi Joseph,
On Wed, 23 Sep 2015, Joseph Wright wrote:
> where ~ has been expanded in the 'system' vars. If I edit them back to ~
> then the installer fails. However, for my real use I can't rely on ~
> expanding to anything fixed: how do I make this work?
Interesting - in my case it succeeded and created a directory
./~
(yes, as is)
I have a quick hack ready that replaces *ALL* values that start with ~
with $HOME (USERPROFILEDIR). Can you try the following patch to
install-tl:
@@ -1577,11 +1577,17 @@ sub read_profile {
open PROFILE, "<$profilepath"
or die "$0: Cannot open profile $profilepath for reading.\n";
my %pro;
+ my $home = getenv('HOME');
+ $home = getenv('USERPROFILE') if win32();
+ $home ||= '~';
while (<PROFILE>) {
chomp;
next if m/^[[:space:]]*$/; # skip empty lines
next if m/^[[:space:]]*#/; # skip comment lines
my ($k,$v) = split (" ", $_, 2); # value might have spaces
+ #
+ # expand ~ to home directory
+ $v =~ s/^~/$home/;
$pro{$k} = $v;
}
foreach (keys %vars) {
Norbert
------------------------------------------------------------------------
PREINING, Norbert http://www.preining.info
JAIST, Japan TeX Live & Debian Developer
GPG: 0x860CDC13 fp: F7D8 A928 26E3 16A1 9FA0 ACF0 6CAC A448 860C DC13
------------------------------------------------------------------------
More information about the tex-live
mailing list