summaryrefslogtreecommitdiff
path: root/Master/install-tl
diff options
context:
space:
mode:
Diffstat (limited to 'Master/install-tl')
-rwxr-xr-xMaster/install-tl32
1 files changed, 29 insertions, 3 deletions
diff --git a/Master/install-tl b/Master/install-tl
index fa6116a6620..319eb5a3d7c 100755
--- a/Master/install-tl
+++ b/Master/install-tl
@@ -99,6 +99,14 @@ use strict;
# $install{$packagename} == 1 if it should be installed
my %install;
+#
+# the different modules have to assign a code blob to this global variable
+# which starts the installation.
+# Example: In install-menu-text.pl there is
+# $::run_menu = \&run_menu_text;
+#
+$::run_menu = sub { die "no UI defined." ; };
+
# the default scheme to be installed
my $default_scheme='scheme-full';
@@ -399,8 +407,8 @@ if ($opt_profile eq "") {
# here we could load different menu systems. Currently several things
# are "our" so that the menu implementation can use it. The $tlpdb, the
# %var, and all the @collection*
- # install-menu-*.pl should implement a function run_menu() and should
- # change ONLY stuff in %vars
+ # install-menu-*.pl have to assign a code ref to $::run_menu which is
+ # run, and should change ONLY stuff in %vars
# The allowed keys in %vars should be specified somewhere ...
# the menu implementation should return
# MENU_INSTALL do the installation
@@ -428,7 +436,8 @@ if ($opt_profile eq "") {
tlwarn("Using text mode installer.\n");
require("installer/install-menu-text.pl");
}
- my $ret = run_menu(@runargs);
+
+ my $ret = &{$::run_menu}(@runargs);
if ($ret == $MENU_QUIT) {
do_cleanup(); MISSING
flushlog();
@@ -1455,6 +1464,23 @@ sub do_portable {
}
}
+#
+# some helper fucntion
+sub select_collections {
+ my $varref = shift;
+ foreach (@_) {
+ $varref->{$_} = 1;
+ }
+}
+
+sub deselect_collections {
+ my $varref = shift;
+ foreach (@_) {
+ $varref->{$_} = 0;
+ }
+}
+
+
__END__
=head1 NAME