33
34
35
36
37
38
39
40
41
42
43
44
45
46
|
set ::env(HOME) [file join [__get_tmpdir] FAKEHOME_$tcl_platform(user)]
catch {
file mkdir $::env(HOME)
}
return $::env(HOME)
}
set pkgcachedir [file join [__get_homedir] ".teapot-client" "cachedir"]
# Conversions from Teapot-style names to local ones
set osTeapotToLocal(tcl) *
set osTeapotToLocal(linux-*) linux
set osTeapotToLocal(win32) windows
|
>
>
>
>
|
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
|
set ::env(HOME) [file join [__get_tmpdir] FAKEHOME_$tcl_platform(user)]
catch {
file mkdir $::env(HOME)
}
return $::env(HOME)
}
proc __unzip {dir file} {
exec unzip -d $dir -n -qq $urlcachefile
}
set pkgcachedir [file join [__get_homedir] ".teapot-client" "cachedir"]
# Conversions from Teapot-style names to local ones
set osTeapotToLocal(tcl) *
set osTeapotToLocal(linux-*) linux
set osTeapotToLocal(win32) windows
|
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
|
close $tmpfd
}
set retarr($extension) [list $ver $arch $server]
switch -regexp -- [::fileutil::fileType $urlcachefile] {
"(^| )zip($| )" {
catch {
exec unzip -d $pkgdir -n -qq $urlcachefile
}
# Process $pkgdir/teapot.txt
set teapot [file join $pkgdir teapot.txt]
if {[file exists $teapot]} {
set fd [open $teapot r]
for {gets $fd line} {![eof $fd]} {gets $fd line} {
|
|
|
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
|
close $tmpfd
}
set retarr($extension) [list $ver $arch $server]
switch -regexp -- [::fileutil::fileType $urlcachefile] {
"(^| )zip($| )" {
catch {
__unzip $pkgdir $urlcachefile
}
# Process $pkgdir/teapot.txt
set teapot [file join $pkgdir teapot.txt]
if {[file exists $teapot]} {
set fd [open $teapot r]
for {gets $fd line} {![eof $fd]} {gets $fd line} {
|