From 0fe443000461d2a17cc516bab4fed84ffa763063 Mon Sep 17 00:00:00 2001 From: Norbert Preining Date: Fri, 13 May 2022 10:58:17 +0900 Subject: WIP userdir argument to install-tl --- Master/install-tl | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) (limited to 'Master/install-tl') diff --git a/Master/install-tl b/Master/install-tl index f4c2106caba..bebf21feb26 100755 --- a/Master/install-tl +++ b/Master/install-tl @@ -300,6 +300,7 @@ my $opt_continue = 1; my $opt_interactive = 1; my $opt_paper = ""; my $opt_texdir = ""; +my $opt_userdir = ""; my %pathopts; # unusual cases: $::opt_select_repository = 0; @@ -404,6 +405,7 @@ GetOptions( "texmfconfig=s" => \$pathopts{'texmfconfig'}, "texmfsysvar=s" => \$pathopts{'texmfsysvar'}, "texmfsysconfig=s" => \$pathopts{'texmfsysconfig'}, + "texuserdir=s" => \$opt_texuserdir, "font=s" => \$opt_font, "tcl", # handled by wrapper "verify-downloads!" => \$opt_verify_downloads, @@ -489,6 +491,9 @@ die "$0: Options profile and in-place are incompatible.\n" die "$0: Options init-from-profile and in-place are incompatible.\n" if ($opt_in_place && $opt_init_from_profile); +die "$0: Options texuserdir and any of texmfhome, texmfconfig, texmfvar are incompatible.\n" + if ($texuserdir && "$texmfhome$texmfconfig$texmfvar"); + if ($#ARGV >= 0) { die "$0: Extra arguments `@ARGV'; try --help if you need it.\n"; } @@ -1632,8 +1637,8 @@ sub set_standard_var { # multiple conflicting definitions, fail! tlwarn("Trying to define $what via conflicting settings:\n"); tlwarn(" from envvar $envstr = $envvar\n") if ($envvar); - tlwarn(" from command line argument $cmdlinestr = $cmdlinevar\n") if ($cmdlinevar); tlwarn(" from profile = $vars{$what}\n") if ($vars{$what}); + tlwarn(" from command line argument $cmdlinestr = $cmdlinevar\n") if ($cmdlinevar); tlwarn(" Preferring the last value from above!\n"); # actual preference order is given via the below call } @@ -1643,8 +1648,8 @@ sub set_standard_var { # - environment variable set_var_from_alternatives( \$vars{$what}, $vars{$what}, - $cmdlinevar, $envvar, + $cmdlinevar, $default); } @@ -1664,9 +1669,9 @@ sub set_texlive_default_dirs { # TODO should we really prefer profile over command line? if ($opt_texdir ne $vars{'TEXDIR'}) { tlwarn("Conflicting settings for installation path given:\n"); - tlwarn(" from command line option --texdir = $opt_texdir\n"); tlwarn(" from profile TEXDIR = $vars{'TEXDIR'}\n"); - tlwarn(" Preferring the profile value!\n"); + tlwarn(" from command line option --texdir = $opt_texdir\n"); + tlwarn(" Preferring the command line value!\n"); # actual setting of preference is done below in the # set_var_from_alternatives( \$vars{'TEXDIR'}, # call, where the order determines the preference! @@ -1678,8 +1683,8 @@ sub set_texlive_default_dirs { # contain the YYYY part (TEXDIR) while the other is the one without. tlwarn("Trying to set up basic path using two incompatible methods:\n"); tlwarn(" from envvar TEXLIVE_INSTALL_PREFIX = $tlprefixenv\n"); - tlwarn(" from command line option --texdir = $opt_texdir\n") if ($opt_texdir); tlwarn(" from profile TEXDIR = $vars{'TEXDIR'}\n") if ($vars{'TEXDIR'}); + tlwarn(" from command line option --texdir = $opt_texdir\n") if ($opt_texdir); tlwarn(" Preferring the later value!\n"); $tlprefixenv = undef; } -- cgit v1.2.3