summaryrefslogtreecommitdiff
path: root/Master/setuptl/TLPM
diff options
context:
space:
mode:
Diffstat (limited to 'Master/setuptl/TLPM')
-rw-r--r--Master/setuptl/TLPM/blng.pm2
-rw-r--r--Master/setuptl/TLPM/check.pm2
-rw-r--r--Master/setuptl/TLPM/cmdl.pm2
-rw-r--r--Master/setuptl/TLPM/common.pm22
-rw-r--r--Master/setuptl/TLPM/constants.pm15
-rw-r--r--Master/setuptl/TLPM/help.pm21
-rw-r--r--Master/setuptl/TLPM/incl.pm2
-rw-r--r--Master/setuptl/TLPM/info.pm2
-rw-r--r--Master/setuptl/TLPM/inst.pm2
-rw-r--r--Master/setuptl/TLPM/list.pm2
-rw-r--r--Master/setuptl/TLPM/pkg.pm13
-rw-r--r--Master/setuptl/TLPM/reg.pm2
-rw-r--r--Master/setuptl/TLPM/uninst.pm2
13 files changed, 68 insertions, 21 deletions
diff --git a/Master/setuptl/TLPM/blng.pm b/Master/setuptl/TLPM/blng.pm
index ed087b0f322..1071298ccf5 100644
--- a/Master/setuptl/TLPM/blng.pm
+++ b/Master/setuptl/TLPM/blng.pm
@@ -1,4 +1,4 @@
-# This file belongs to TLPM v2.17, TeX Live Package Manager
+# This file belongs to TLPM v2.19, TeX Live Package Manager
# Public Domain, P.Jackowski@gust.org.pl
# blng [-pf] <name>
diff --git a/Master/setuptl/TLPM/check.pm b/Master/setuptl/TLPM/check.pm
index 74fc45d66b4..89390961f3f 100644
--- a/Master/setuptl/TLPM/check.pm
+++ b/Master/setuptl/TLPM/check.pm
@@ -1,4 +1,4 @@
-# This file belongs to TLPM v2.17, TeX Live Package Manager
+# This file belongs to TLPM v2.19, TeX Live Package Manager
# Public Domain, P.Jackowski@gust.org.pl
# check [-pf]
diff --git a/Master/setuptl/TLPM/cmdl.pm b/Master/setuptl/TLPM/cmdl.pm
index 93bc67497e0..bb52becb9a8 100644
--- a/Master/setuptl/TLPM/cmdl.pm
+++ b/Master/setuptl/TLPM/cmdl.pm
@@ -1,4 +1,4 @@
-# This file belongs to TLPM v2.17, TeX Live Package Manager
+# This file belongs to TLPM v2.19, TeX Live Package Manager
# Public Domain, P.Jackowski@gust.org.pl
# cmdline parsing
diff --git a/Master/setuptl/TLPM/common.pm b/Master/setuptl/TLPM/common.pm
index c3da31d5077..a9e9cfcfc2d 100644
--- a/Master/setuptl/TLPM/common.pm
+++ b/Master/setuptl/TLPM/common.pm
@@ -1,4 +1,4 @@
-# This file belongs to TLPM v2.17, TeX Live Package Manager
+# This file belongs to TLPM v2.19, TeX Live Package Manager
# Public Domain, P.Jackowski@gust.org.pl
# common procedures;
@@ -95,6 +95,26 @@ sub sys
return $?;
}
+sub set
+{
+ my ($key, $val);
+ while($key = shift @_)
+ {
+ if($key =~ /=/)
+ {
+ ($key, $val) = split("=",$key);
+ }
+ else
+ {
+ $val = shift(@_);
+ }
+ unless($key eq '')
+ {
+ $ENV{$key} = $val;
+ }
+ }
+}
+
# messaging
$message_prefix = '% ';
diff --git a/Master/setuptl/TLPM/constants.pm b/Master/setuptl/TLPM/constants.pm
index e0ff1069127..b7a85c69a8f 100644
--- a/Master/setuptl/TLPM/constants.pm
+++ b/Master/setuptl/TLPM/constants.pm
@@ -1,4 +1,4 @@
-# This file belongs to TLPM v2.17, TeX Live Package Manager
+# This file belongs to TLPM v2.19, TeX Live Package Manager
# Public Domain, P.Jackowski@gust.org.pl
# widely used constants
@@ -10,7 +10,9 @@ $false = 0;
$reg_file = qr/([^\/\\]+)\z/o;
$reg_dirsep = qr/[\/\\]/o; # not /(\/|\\)/
+
# TLPM was originally windowish and is tested mostly on windows so
+
unless(defined $tlpm_os){$tlpm_os = 'win32'} # if in distribution, always defined in BEGIN block
if($tlpm_os eq 'win32'){$win32 = $true}
@@ -34,6 +36,7 @@ $parent_dir = &rel2abs('..',$curr_dir);
# tlpm related constants
+$tlpm_version ||= "_devel";
$tlpm_prompt = "tlpm" . $tlpm_version . ">";
$tlpm_log = $chr_dirsep . "tlpm.log"; # log file
@@ -47,11 +50,15 @@ $tl_lists = $tl_texmf . $chr_dirsep . "lists";
$chr_dirsep . "texmf-dist" . $chr_dirsep . "tpm",
$chr_dirsep . "texmf-doc" . $chr_dirsep . "tpm");
-# paths to source TL directory (relative to mounting point / drive)
+# paths to source TL directory (relative to CD/DVD mounting point / drive)
@tl_roots = ('',
$chr_dirsep . "texlive",
- $chr_dirsep . "texlive2004");
+ $chr_dirsep . "texlive2004",
+ # $chr_dirsep . "texlive2005",
+ # $chr_dirsep . "texlive2006",
+ # $chr_dirsep . "texlive2007"
+ );
# ZIP archive
@@ -67,7 +74,7 @@ if($win32)
}
else
{
- $tl_unzip = sub {return "unzip"}; # assuming in system
+ $tl_unzip = sub {return "unzip"}; # assuming available in the system
$tl_xcopy = "cp";
$sys_redir = '>/dev/null';
}
diff --git a/Master/setuptl/TLPM/help.pm b/Master/setuptl/TLPM/help.pm
index b8dc62535a7..5a970d7c114 100644
--- a/Master/setuptl/TLPM/help.pm
+++ b/Master/setuptl/TLPM/help.pm
@@ -1,4 +1,4 @@
-# This file belongs to TLPM v2.17, TeX Live Package Manager
+# This file belongs to TLPM v2.19, TeX Live Package Manager
# Public Domain, P.Jackowski@gust.org.pl
# help
@@ -141,6 +141,10 @@ Bugs reports and comments are welcome (tlpmgui\@gust.org.pl)
there is no such a command available anymore; program version
is displayed in the banner and command prompt
09.01.2007, 2.17 -- code comments, readme changes
+12.01.2007, 2.18 -- since 'cmd set...' does not work as expected (the variable is
+ not kept in the environment during TLPM session), we introduce
+ new 'set' command
+12.01.2007, 2.19 -- protection from defining variables of empty name
* Known issues
1. Installation from DVD is much slower than from CD. Sorry...
@@ -176,6 +180,7 @@ uninst uninstall a package from specified target directory
check check installation dependencies and consistency
info show package info
help show this help or the given command description
+set set environment variable for current TLPM session
cmd execute a system command
quit leave the program
@@ -427,14 +432,24 @@ cmd mount /dev/cd /mnt/cd
cmd tex \\input story \\end
% clear screen
-cmd clear"
+cmd clear",
+
+'set' =>
+"USAGE:
+set \<key-val list\>
+
+DESCRIPTION:
+(Re)Sets environment variable for the current TLPM session.
+
+EXAMPLES:
+set TEXMFCNF=D:/TeX/texmf/web2c LOFO=.;lofo//"
);
sub readme
{
my $z;
my $sep = '#';
- my @topics = qw( technical_notes tlpm list incl blng inst uninst check help info cmd quit);
+ my @topics = qw( technical_notes tlpm list incl blng inst uninst check help info set cmd quit);
$heeelp -> (shift @topics);
$mess -> ("\n" . $sep x $row_length . "\n" . ' ' x 30 . "COMMANDS IN DETAILS\n" . $sep x $row_length );
foreach(@topics)
diff --git a/Master/setuptl/TLPM/incl.pm b/Master/setuptl/TLPM/incl.pm
index fdf7601a7f3..371a760415d 100644
--- a/Master/setuptl/TLPM/incl.pm
+++ b/Master/setuptl/TLPM/incl.pm
@@ -1,4 +1,4 @@
-# This file belongs to TLPM v2.17, TeX Live Package Manager
+# This file belongs to TLPM v2.19, TeX Live Package Manager
# Public Domain, P.Jackowski@gust.org.pl
# incl <pkg> [-pfer] <mask>
diff --git a/Master/setuptl/TLPM/info.pm b/Master/setuptl/TLPM/info.pm
index d9902491f31..6ae1a67e291 100644
--- a/Master/setuptl/TLPM/info.pm
+++ b/Master/setuptl/TLPM/info.pm
@@ -1,4 +1,4 @@
-# This file belongs to TLPM v2.17, TeX Live Package Manager
+# This file belongs to TLPM v2.19, TeX Live Package Manager
# Public Domain, P.Jackowski@gust.org.pl
# info <pkg>
diff --git a/Master/setuptl/TLPM/inst.pm b/Master/setuptl/TLPM/inst.pm
index 9aabd3a4174..65b5614b61e 100644
--- a/Master/setuptl/TLPM/inst.pm
+++ b/Master/setuptl/TLPM/inst.pm
@@ -1,4 +1,4 @@
-# This file belongs to TLPM v2.17, TeX Live Package Manager
+# This file belongs to TLPM v2.19, TeX Live Package Manager
# Public Domain, P.Jackowski@gust.org.pl
# inst <pkg> [-jrou]
diff --git a/Master/setuptl/TLPM/list.pm b/Master/setuptl/TLPM/list.pm
index 0721f47d7db..8d8981bc941 100644
--- a/Master/setuptl/TLPM/list.pm
+++ b/Master/setuptl/TLPM/list.pm
@@ -1,4 +1,4 @@
-# This file belongs to TLPM v2.17, TeX Live Package Manager
+# This file belongs to TLPM v2.19, TeX Live Package Manager
# Public Domain, P.Jackowski@gust.org.pl
# list [-pfe] <mask>
diff --git a/Master/setuptl/TLPM/pkg.pm b/Master/setuptl/TLPM/pkg.pm
index 1a969f355e5..a02cc4e9b8b 100644
--- a/Master/setuptl/TLPM/pkg.pm
+++ b/Master/setuptl/TLPM/pkg.pm
@@ -1,4 +1,4 @@
-# This file belongs to TLPM v2.17, TeX Live Package Manager
+# This file belongs to TLPM v2.19, TeX Live Package Manager
# Public Domain, P.Jackowski@gust.org.pl
# packages handling
@@ -154,7 +154,9 @@ sub set_source
unless($batch_mode) # the last chance is prompt
{
print STDOUT "TeX Live source drive: ";
- $tl_source = <STDIN>;chomp $tl_source;
+ $tl_source = <STDIN>;
+ chomp $tl_source;
+ &resolve_env($tl_source);
if(&is_tl_root($tl_source))
{
return(0);
@@ -170,7 +172,9 @@ sub set_source
unless($batch_mode)
{
print STDOUT "TeX Live source mounting point: ";
- $tl_source = <STDIN>;chomp $tl_source;
+ $tl_source = <STDIN>;
+ chomp $tl_source;
+ &resolve_env($tl_source);
if(&is_tl_root($tl_source))
{
return(0);
@@ -264,7 +268,7 @@ sub set_target
{
&set_target_();
}
- # we tried to test if the directory is writable, but even CD drive respond to be writable...
+ # I tried to test if the directory is writable, but even CD drive respond to be writable...
#unless(-w $tl_target)
#{
# &undef_target();
@@ -277,6 +281,7 @@ sub set_target
sub set_target_
{
&norm_path($tl_target);
+ &resolve_env($tl_target);
$tl_target = &rel2abs($tl_target,$curr_dir);
$tl_target_indeed = $true;
}
diff --git a/Master/setuptl/TLPM/reg.pm b/Master/setuptl/TLPM/reg.pm
index c9cd74b4066..09246a2e7dc 100644
--- a/Master/setuptl/TLPM/reg.pm
+++ b/Master/setuptl/TLPM/reg.pm
@@ -1,4 +1,4 @@
-# This file belongs to TLPM v2.17, TeX Live Package Manager
+# This file belongs to TLPM v2.19, TeX Live Package Manager
# Public Domain, P.Jackowski@gust.org.pl
# regexp and mask related functions
diff --git a/Master/setuptl/TLPM/uninst.pm b/Master/setuptl/TLPM/uninst.pm
index 1f789e896fb..f04fc5092db 100644
--- a/Master/setuptl/TLPM/uninst.pm
+++ b/Master/setuptl/TLPM/uninst.pm
@@ -1,4 +1,4 @@
-# This file belongs to TLPM v2.17, TeX Live Package Manager
+# This file belongs to TLPM v2.19, TeX Live Package Manager
# Public Domain, P.Jackowski@gust.org.pl
# uninst <pkg> [-rjF] [dir]