diff options
author | Norbert Preining <preining@logic.at> | 2022-03-05 14:03:21 +0000 |
---|---|---|
committer | Norbert Preining <preining@logic.at> | 2022-03-05 14:03:21 +0000 |
commit | 3f56a2387224b352fe370d8ec94ca49aa1d3d937 (patch) | |
tree | 4edf802ca70969a3030853e2534c6dd9890e3b03 /Master/tlpkg/installer/install-menu-text.pl | |
parent | 09a830748cdedad7fc6dbd8d239513e7374c97f4 (diff) |
installer and free disk space improvements
- factor free disk space computation into a new TLUtils function
- save (and update) the free disk space for the current TEXDIR in %vars
- display the free disk space (if it is available) in the text menu
git-svn-id: svn://tug.org/texlive/trunk@62431 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/tlpkg/installer/install-menu-text.pl')
-rw-r--r-- | Master/tlpkg/installer/install-menu-text.pl | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/Master/tlpkg/installer/install-menu-text.pl b/Master/tlpkg/installer/install-menu-text.pl index 9cc79fe8ebb..9f20c7ec7a4 100644 --- a/Master/tlpkg/installer/install-menu-text.pl +++ b/Master/tlpkg/installer/install-menu-text.pl @@ -545,6 +545,10 @@ EOF if ("\u$answer" eq '1' and !$opt_in_place) { print "New value for TEXDIR [$vars{'TEXDIR'}]: "; $answer = &input_dirname (); + # update free space information + if ($answer ne $vars{'TEXDIR'}) { + $vars{'free_size'} = TeXLive::TLUtils::diskfree($answer); + } $vars{'TEXDIR'} = $answer if $answer ne ""; my $texdirnoslash; if ($vars{'TEXDIR'}=~/^(.*)\/$texlive_release$/) { @@ -1035,6 +1039,7 @@ sub main_menu { } clear_screen; + my $freestring = ($vars{'free_size'} >= 0 ? " (free: $vars{'free_size'} MB)" : ""); print <<"EOF"; ======================> TeX Live installation procedure <===================== @@ -1053,7 +1058,7 @@ EOF <S> set installation scheme: $vars{'selected_scheme'} <C> set installation collections: - $vars{'n_collections_selected'} collections out of $vars{'n_collections_available'}, disk space required: $vars{'total_size'} MB + $vars{'n_collections_selected'} collections out of $vars{'n_collections_available'}, disk space required: $vars{'total_size'} MB$freestring EOF } |