[TSP], 22th of October 2007: tlinker is a small utility script I use to attach packages to Starkits. It takes up two arguments, first being the package name, and second being the .vfs directory. Note, that the script expects for the lib directory to be already there. catch {package require fubar} if { $argc != 2 } { puts "Usage: tlinker " exit 1 } set package [lindex $argv 0] set vfs [lindex $argv 1] set versions [package versions $package] if { "$versions" == {}} { puts stderr "tlinker: $package: no such package" exit 1 } set res [package ifneeded $package [lindex $versions 0]] regexp {(.+)/[^/]+} [lindex $res 1] -> r if { $tcl_platform(platform) == unix } { puts [exec sh -c "cp -Rv $r $vfs/lib"] } elseif { $tcl_platform(platform) == windows } { puts [exec cp $r $vfs/lib] } else { puts "Unsupported platform!" } If anyone has the [exec] command for the copy for Mac OS X, I'd be grateful to have it :) ---- [RS] Some notes: * For real platform independence, Tcl has [file copy]. * And you can make sure the directory exists by calling [file mkdir] - it is a no-op if it exists, and creates it otherwise. * The [regexp] seems to do the work of [file tail]?