summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/scripts/tlshell
diff options
context:
space:
mode:
authorSiep Kroonenberg <siepo@cybercomm.nl>2018-11-06 13:16:52 +0000
committerSiep Kroonenberg <siepo@cybercomm.nl>2018-11-06 13:16:52 +0000
commit8331d77f4583d3cd265d7b495da63da3354b3974 (patch)
tree867e53fa39355debdf1d8add3d28cbbd57d73a79 /Master/texmf-dist/scripts/tlshell
parentce56884c340c40aaf5c90d736a404208ef486943 (diff)
Fixes locale detection; tlshell searchpath
git-svn-id: svn://tug.org/texlive/trunk@49091 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/scripts/tlshell')
-rwxr-xr-xMaster/texmf-dist/scripts/tlshell/tlshell.tcl42
1 files changed, 24 insertions, 18 deletions
diff --git a/Master/texmf-dist/scripts/tlshell/tlshell.tcl b/Master/texmf-dist/scripts/tlshell/tlshell.tcl
index 02a74e49807..23656017587 100755
--- a/Master/texmf-dist/scripts/tlshell/tlshell.tcl
+++ b/Master/texmf-dist/scripts/tlshell/tlshell.tcl
@@ -10,6 +10,27 @@ package require Tk
# security: disable send
catch {rename send {}}
+# unix: make sure TL comes first on process searchpath
+# on windows, runscript takes care of this.
+if {$::tcl_platform(platform) ne "windows"} {
+ set texbin [file dirname [file normalize [info script]]]
+ set savedir [pwd]
+ cd $texbin
+ set texbin [pwd]
+ cd $savedir
+ # prepend texbin to PATH, unless it is already the _first_
+ # path component
+ set dirs [split $::env(PATH) ":"]
+ if {[lindex $dirs 0] ne $texbin} {
+ set ::env(PATH) "${texbin}:$::env(PATH)"
+ }
+ unset texbin
+ unset savedir
+ unset dirs
+ # now is a good time to ask tlmgr for the _TL_ name of our platform
+ set ::our_platform [exec tlmgr print-platform]
+}
+
# declarations and utilities shared with install-tl-gui.tcl
set ::instroot [exec kpsewhich -var-value=TEXMFROOT]
source [file join $::instroot "tlpkg" "TeXLive" "tltcl.tcl"]
@@ -2113,22 +2134,7 @@ proc populate_main {} {
proc initialize {} {
# seed random numbers
expr {srand([clock seconds])}
- # unix: make sure TL comes first on process searchpath
- if {$::tcl_platform(platform) ne "windows"} {
- set texbin [file dirname [file normalize [info script]]]
- set savedir [pwd]
- cd $texbin
- set texbin [pwd]
- cd $savedir
- # prepend texbin to PATH, unless it is already the _first_
- # path component
- set dirs [split $::env(PATH) ":"]
- if {[lindex $dirs 0] ne $texbin} {
- set ::env(PATH) "${texbin}:$::env(PATH)"
- }
- # now is a good time to ask tlmgr for the _TL_ name of our platform
- set ::our_platform [exec tlmgr print-platform]
- }
+
# directory for temp files
set attemptdirs {}
foreach tmp {TMPDIR TEMP TMP} {
@@ -2173,8 +2179,8 @@ proc initialize {} {
# languages
set ::langs [list "en"]
foreach l [glob -nocomplain -directory \
- [file join $::instroot "tlpkg" "translations"] *.msg] {
- lappend ::langs [string range [file tail $l] 0 end-4]
+ [file join $::instroot "tlpkg" "translations"] *.po] {
+ lappend ::langs [string range [file tail $l] 0 end-3]
}
# in case we are going to do something with json: