summaryrefslogtreecommitdiff
path: root/Master/install-tl
diff options
context:
space:
mode:
Diffstat (limited to 'Master/install-tl')
-rwxr-xr-xMaster/install-tl20
1 files changed, 20 insertions, 0 deletions
diff --git a/Master/install-tl b/Master/install-tl
index dae929aa4f4..5e701e9958c 100755
--- a/Master/install-tl
+++ b/Master/install-tl
@@ -1807,6 +1807,26 @@ sub select_scheme {
calc_depends();
}
+# try to give a decent order of schemes, but be so general that
+# if we change names of schemes nothing bad happnes (like forgetting one)
+sub schemes_ordered_for_presentation {
+ my @scheme_order;
+ my %schemes_shown;
+ for my $s ($tlpdb->schemes) { $schemes_shown{$s} = 0 ; }
+ # first try the size-name-schemes in decreasing order
+ for my $sn (qw/full medium small basic minimal/) {
+ if (defined($schemes_shown{"scheme-$sn"})) {
+ push @scheme_order, "scheme-$sn";
+ $schemes_shown{"scheme-$sn"} = 1;
+ }
+ }
+ # now push all the other schemes if they are there and not already shown
+ for my $s (sort keys %schemes_shown) {
+ push @scheme_order, $s if !$schemes_shown{$s};
+ }
+ return @scheme_order;
+}
+
sub update_numbers {
$vars{'n_collections_available'}=0;
$vars{'n_collections_selected'} = 0;