summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/scripts/tlshell/tlshell.tcl
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/scripts/tlshell/tlshell.tcl')
-rwxr-xr-xMaster/texmf-dist/scripts/tlshell/tlshell.tcl27
1 files changed, 11 insertions, 16 deletions
diff --git a/Master/texmf-dist/scripts/tlshell/tlshell.tcl b/Master/texmf-dist/scripts/tlshell/tlshell.tcl
index 9c2a7441ea3..a1352ebbc9d 100755
--- a/Master/texmf-dist/scripts/tlshell/tlshell.tcl
+++ b/Master/texmf-dist/scripts/tlshell/tlshell.tcl
@@ -11,27 +11,22 @@ package require Tk
catch {rename send {}}
# make sure TL comes first on process searchpath
-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 {$::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)"
}
-} else {
- set texbin [file nativename $texbin]
- if {[file nativename [lindex $dirs 0]] ne $texbin} {
- set ::env(PATH) "${texbin}:$::env(PATH)"
- }
+ unset texbin
+ unset savedir
+ unset dirs
}
-unset texbin
-unset savedir
-unset dirs
# declarations and utilities shared with install-tl-gui.tcl
set ::instroot [exec kpsewhich -var-value=TEXMFROOT]