set Demos { Tkzinc } proc usage {} { global Demos puts "please specify a package from the following list:" puts " [join $Demos { }]" } if { [llength $argv] == 0 } { usage exit } set path [file dirname [info script]] switch -- [lindex $argv 0] { Tkzinc { source [file join [lindex [glob -directory [file join $path lib] Tkzinc*] 0] demos zinc-widget] } default usage }