Tcl really cares about newlines. It treats them like many other languages treat semicolons, as a command terminator. (You can use semicolons in Tcl too if you want, but that's uncommon.)
Because of that, your script:
set dir plugins/noarch/tcl/vmdICE1.0 source $dir pkgIndex.tcl vmd_install_extension vmdICE xrmsdgui_tk_cb "Analysis/vmdICE"
is hopelessly wrong. It's one call of a command, set
, with far too many arguments. If we add in the newlines in the most likely places, we get:
set dir plugins/noarch/tcl/vmdICE1.0
source $dir pkgIndex.tcl
vmd_install_extension vmdICE
xrmsdgui_tk_cb "Analysis/vmdICE"
Now that's still wrong, but it's much closer to right. The last key bit of fixing is to make the filename to source
correct:
set dir plugins/noarch/tcl/vmdICE1.0
source $dir/pkgIndex.tcl
vmd_install_extension vmdICE
xrmsdgui_tk_cb "Analysis/vmdICE"
I don't know whether that will work for you, but it at least looks sane to me.