Check-in [aca04fd88d]
Overview
Comment:Added Makefile to build Starkit Fixed bug in teapot client package Updated teapot client package to use various temporary directory possibilities Updated help on teapot client
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: aca04fd88d1a88abd0561604702de38ed929503e
User & Date: rkeene on 2009-04-18 03:04:04
Other Links: manifest | tags
Context
2009-04-18
03:11
Updated client to sort list output check-in: 1efd339cd7 user: rkeene tags: trunk
03:04
Added Makefile to build Starkit Fixed bug in teapot client package Updated teapot client package to use various temporary directory possibilities Updated help on teapot client check-in: aca04fd88d user: rkeene tags: trunk
02:48
Renamed teapot.tcl to teapot-client.tcl check-in: d64ee24bd0 user: rkeene tags: trunk
Changes

Added .fossil-settings/ignore-glob version [f6e6d8eca3].





>
>
1
2
client/teapot-client.kit
client/teapot-client.kit/*

Added client/Makefile version [3e756cea1a].











































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
all: teapot-client.kit

teapot-client.kit: teapot-client.tcl lib/teapotclient0.1/pkgIndex.tcl lib/teapotclient0.1/teapotclient.tcl
	rm -rf teapot-client-tmp.vfs
	mkdir teapot-client-tmp.vfs
	cp -r lib teapot-client.tcl teapot-client-tmp.vfs/
	echo 'package require starkit' > teapot-client-tmp.vfs/main.tcl
	echo 'starkit::startup' >> teapot-client-tmp.vfs/main.tcl
	echo 'source $$starkit::topdir/teapot-client.tcl' >> teapot-client-tmp.vfs/main.tcl
	./teapot-client.tcl get teapot-client-tmp.vfs/ tcl tcl md5 fileutil
	$$(../../starkit2exe/support/find-tclkit) ../../starkit2exe/support/sdx.kit wrap teapot-client-tmp.kit
	rm -rf teapot-client-tmp.vfs
	mv teapot-client-tmp.kit teapot-client.kit

clean:
	rm -f teapot-client.kit
	rm -rf teapot-client-tmp.vfs

distclean: clean

.PHONY: all clean distclean

Modified client/lib/teapotclient0.1/teapotclient.tcl from [b940fef8b1] to [e6f656d8b6].

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 "*"}} {

Modified client/teapot-client.tcl from [74f5cdd85f] to [dbdef8ce98].

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#! /usr/bin/env tclsh

set teapotservers [list teapot.activestate.com]

lappend auto_path [file join [file dirname [info script]] lib]

package require teapotclient

proc print_help {} {
	puts stderr "Usage: teapot-client.tcl get <dir> <os> <cpu> <packages...>"
	puts stderr "Usage: teapot-client.tcl list ?<os> ?<cpu>??"
}

set cmd [lindex $argv 0]
set argv [lrange $argv 1 end]

switch -- $cmd {
	"get" {









|
|







1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#! /usr/bin/env tclsh

set teapotservers [list teapot.activestate.com]

lappend auto_path [file join [file dirname [info script]] lib]

package require teapotclient

proc print_help {} {
	puts stderr "Usage: teapot-client get <dir> <os> <cpu> <packages...>"
	puts stderr "Usage: teapot-client list ?<os> ?<cpu>??"
}

set cmd [lindex $argv 0]
set argv [lrange $argv 1 end]

switch -- $cmd {
	"get" {