68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
|
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
set osTeapotToLocal(solaris*) solaris
set osTeapotToLocal(freebsd) freebsd_*
set osTeapotToLocal(irix) irix_*
set cpuTeapotToLocal(ix86) x86
set cpuTeapotToLocal(sparc) sun4*
set cpuTeapotToLocal(universal) *
set cpuTeapotToLocal(powerpc) ppc
proc download_extensions {rootdir servers extensions os cpu {existingExts ""}} {
foreach chkdefext [list Tcl Tk] {
if {[lsearch -exact $existingExts $chkdefext] == -1} {
lappend existingExts $chkdefext
}
}
|
|
|
|
|
|
|
|
|
|
|
|
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
|
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) [list *]
set osTeapotToLocal(linux-*) [list linux]
set osTeapotToLocal(win32) [list windows]
set osTeapotToLocal(solaris*) [list solaris]
set osTeapotToLocal(freebsd) [list freebsd_*]
set osTeapotToLocal(irix) [list irix_*]
set cpuTeapotToLocal(ix86) [list x86 intel]
set cpuTeapotToLocal(sparc) [list sun4*]
set cpuTeapotToLocal(universal) [list *]
set cpuTeapotToLocal(powerpc) [list ppc]
proc download_extensions {rootdir servers extensions os cpu {existingExts ""}} {
foreach chkdefext [list Tcl Tk] {
if {[lsearch -exact $existingExts $chkdefext] == -1} {
lappend existingExts $chkdefext
}
}
|
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
|
set isCompatOS 0
if {$arch == "tcl"} {
set isCompatOS 1
} elseif {[string match $limitos $arch_os]} {
set isCompatOS 1
} else {
foreach {teapot local} [array get osTeapotToLocal] {
if {[string match $limitos $local] || [string match $local $limitos]} {
if {[string match $teapot $arch_os] || [string match $arch_os $teapot]} {
set isCompatOS 1
break
}
}
}
}
if {!$isCompatOS} {
continue
}
set isCompatCPU 0
if {$arch == "tcl"} {
set isCompatCPU 1
} elseif {[string match $limitcpu $arch_cpu]} {
set isCompatCPU 1
} else {
foreach {teapot local} [array get cpuTeapotToLocal] {
if {[string match $limitcpu $local] || [string match $local $limitcpu]} {
if {[string match $teapot $arch_cpu] || [string match $arch_cpu $teapot]} {
set isCompatCPU 1
break
}
}
}
}
if {!$isCompatCPU} {
continue
}
|
|
>
|
|
|
|
>
|
>
|
|
|
|
>
|
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
|
set isCompatOS 0
if {$arch == "tcl"} {
set isCompatOS 1
} elseif {[string match $limitos $arch_os]} {
set isCompatOS 1
} else {
foreach {teapot localvariants} [array get osTeapotToLocal] {
foreach local $localvariants {
if {[string match $limitos $local] || [string match $local $limitos]} {
if {[string match $teapot $arch_os] || [string match $arch_os $teapot]} {
set isCompatOS 1
break
}
}
}
}
}
if {!$isCompatOS} {
continue
}
set isCompatCPU 0
if {$arch == "tcl"} {
set isCompatCPU 1
} elseif {[string match $limitcpu $arch_cpu]} {
set isCompatCPU 1
} else {
foreach {teapot localvariants} [array get cpuTeapotToLocal] {
foreach local $localvariants {
if {[string match $limitcpu $local] || [string match $local $limitcpu]} {
if {[string match $teapot $arch_cpu] || [string match $arch_cpu $teapot]} {
set isCompatCPU 1
break
}
}
}
}
}
if {!$isCompatCPU} {
continue
}
|