Check-in [935196ec59]
Overview
Comment:Added the ability to change the cache dir Set the default cache dir to be in the current user's home directory
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1:935196ec59065bad3c260d48e028f01046483151
User & Date: rkeene on 2009-04-18 03:21:32
Other Links: manifest | tags
Context
2009-04-18
03:25
Built-in SDX and removed references to starkit2exe check-in: 5defb7723e user: rkeene tags: trunk
03:21
Added the ability to change the cache dir Set the default cache dir to be in the current user's home directory check-in: 935196ec59 user: rkeene tags: trunk
03:11
Updated client to sort list output check-in: 1efd339cd7 user: rkeene tags: trunk
Changes

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

14
15
16
17
18
19
20
21




















22
23
24
25
26
27
28
...
272
273
274
275
276
277
278



279
280
281
			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_*
................................................................................
		foreach pkg [array names pkginfo] {
			set pkginfo($pkg) [lsort -decreasing -dictionary $pkginfo($pkg)]
		}

		return [array get pkginfo]
	}




}

package provide teapotclient 0.1







|
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>







 







>
>
>



14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
...
292
293
294
295
296
297
298
299
300
301
302
303
304
			if {[info exists ::env($checkenv)]} {
				return $::env($checkenv)
			}
		}
		return "/tmp"
	}

	proc __get_homedir {} {
		if {[info exists ::env(HOME)]} {
			return $::env(HOME)
		}

		catch {
			set ::env(HOME) [file normalize ~]
		}
		if {[info exists ::env(HOME)]} {
			return $::env(HOME)
		}

		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
	set osTeapotToLocal(solaris*) solaris
	set osTeapotToLocal(freebsd) freebsd_*
................................................................................
		foreach pkg [array names pkginfo] {
			set pkginfo($pkg) [lsort -decreasing -dictionary $pkginfo($pkg)]
		}

		return [array get pkginfo]
	}

	proc setcachedir {dir} {
		set ::teapotclient::pkgcachedir $dir
	}
}

package provide teapotclient 0.1