ADDED .fossil-settings/ignore-glob Index: .fossil-settings/ignore-glob ================================================================== --- /dev/null +++ .fossil-settings/ignore-glob @@ -0,0 +1,2 @@ +client/teapot-client.kit +client/teapot-client.kit/* ADDED client/Makefile Index: client/Makefile ================================================================== --- /dev/null +++ client/Makefile @@ -0,0 +1,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 Index: client/lib/teapotclient0.1/teapotclient.tcl ================================================================== --- client/lib/teapotclient0.1/teapotclient.tcl +++ client/lib/teapotclient0.1/teapotclient.tcl @@ -7,11 +7,20 @@ 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" + 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 @@ -148,11 +157,11 @@ lappend fetchDeps $dep } } if {[info exists fetchDeps]} { - set addRet [download_extensions_teapot $rootdir $servers $fetchDeps $os $cpu $existingExts] + set addRet [download_extensions $rootdir $servers $fetchDeps $os $cpu $existingExts] array set retarr $addRet } return [array get retarr] } Index: client/teapot-client.tcl ================================================================== --- client/teapot-client.tcl +++ client/teapot-client.tcl @@ -5,12 +5,12 @@ lappend auto_path [file join [file dirname [info script]] lib] package require teapotclient proc print_help {} { - puts stderr "Usage: teapot-client.tcl get