1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
|
#! /usr/bin/env tclsh
# This file has no license. It is in the public domain.
# -- Roy Keene <tcl@rkeene.org> [20081025T1400Q]
package require md5
package require http
package require fileutil
namespace eval ::teapotclient {}
namespace eval ::teapotclient {
set pkgcachedir "/tmp/DELETEME_teapotclient_[string tolower [md5::md5 -hex [list [info script] $::tcl_platform(user)]]].cache"
# 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_*
|
>
>
>
>
>
>
>
>
>
|
|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
|
#! /usr/bin/env tclsh
# This file has no license. It is in the public domain.
# -- Roy Keene <tcl@rkeene.org> [20081025T1400Q]
package require md5
package require http
package require fileutil
namespace eval ::teapotclient {}
namespace eval ::teapotclient {
proc __get_tmpdir {} {
foreach checkenv [list TMPDIR TEMP TMP TEMPDIR] {
if {[info exists ::env($checkenv)]} {
return $::env($checkenv)
}
}
return "/tmp"
}
set pkgcachedir [file join [__get_tmpdir] "DELETEME_teapotclient_[string tolower [md5::md5 -hex [list [info script] $::tcl_platform(user)]]].cache"]
# 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_*
|
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
|
if {[lsearch $existingExts $dep] == -1} {
lappend existingExts $dep
lappend fetchDeps $dep
}
}
if {[info exists fetchDeps]} {
set addRet [download_extensions_teapot $rootdir $servers $fetchDeps $os $cpu $existingExts]
array set retarr $addRet
}
return [array get retarr]
}
proc get_extensions {server {limitos "*"} {limitcpu "*"}} {
|
|
|
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
|
if {[lsearch $existingExts $dep] == -1} {
lappend existingExts $dep
lappend fetchDeps $dep
}
}
if {[info exists fetchDeps]} {
set addRet [download_extensions $rootdir $servers $fetchDeps $os $cpu $existingExts]
array set retarr $addRet
}
return [array get retarr]
}
proc get_extensions {server {limitos "*"} {limitcpu "*"}} {
|