From 443c3ad0447b1bdec301bfbc0397b5290b2ea9b3 Mon Sep 17 00:00:00 2001 From: Siep Kroonenberg Date: Wed, 3 Apr 2019 20:34:55 +0000 Subject: Writability test at start; display TL root git-svn-id: svn://tug.org/texlive/trunk@50726 c570f23f-e606-0410-a88d-b1316a301751 --- Master/texmf-dist/scripts/tlshell/tlshell.tcl | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) (limited to 'Master') diff --git a/Master/texmf-dist/scripts/tlshell/tlshell.tcl b/Master/texmf-dist/scripts/tlshell/tlshell.tcl index e0f2497c422..5254aaa2626 100755 --- a/Master/texmf-dist/scripts/tlshell/tlshell.tcl +++ b/Master/texmf-dist/scripts/tlshell/tlshell.tcl @@ -29,8 +29,9 @@ if {$::tcl_platform(platform) ne "windows"} { unset dirs } -# declarations and utilities shared with install-tl-gui.tcl set ::instroot [exec kpsewhich -var-value=TEXMFROOT] + +# declarations and utilities shared with install-tl-gui.tcl source [file join $::instroot "tlpkg" "tltcl" "tltcl.tcl"] # now is a good time to ask tlmgr for the _TL_ name of our platform @@ -2091,6 +2092,8 @@ proc populate_main {} { # right frame ppack [ttk::frame .topfr] -in .topf -side right -anchor ne + pack [ttk::label .topfr.lroot] -side top -anchor e + .topfr.lroot configure -text [__ "Root at %s" $::instroot] pack [ttk::label .topfr.linfra] -side top -anchor e pack [ttk::label .topfr.lshell] -side top -anchor e @@ -2284,6 +2287,14 @@ proc initialize {} { populate_main + # testing writablilty earlier led to sizing problems + if {! [file writable $::instroot]} { + set ans [tk_messageBox -type yesno -icon warning -message \ + [__ "%s is not writable. You can probably not do much. + Are you sure you want to continue?" $::instroot]] + if {$ans ne "yes"} {exit} + } + start_tlmgr get_repos_from_tlmgr .topfl.lrepos configure -text [print_repos] -- cgit v1.2.3