Files
sics/site_ansto/instrument/pelican/config/tasmad/sicscommon/batch.tcl
Jing Chen 22b22ffa25 add Pelican
r3108 | jgn | 2011-04-20 12:29:55 +1000 (Wed, 20 Apr 2011) | 1 line
2012-11-15 17:10:56 +11:00

30 lines
660 B
Tcl

#--------------------------------------------
# The old batchrun, batchroot pair
# Mark Koennecke, since 1996
#--------------------------------------------
if { [info exists batchinit] == 0 } {
set batchinit 1
Publish batchroot Spy
Publish batchrun User
}
proc SplitReply { text } {
set l [split $text =]
return [lindex $l 1]
}
#---------------------
proc batchrun file {
exe [string trim [SplitReply [batchroot]]/$file]
}
#---------------------
proc batchroot args {
if {[llength $args] > 1} {
exe batchpath [lindex $args 0]
return OK
} else {
set bp [SplitReply [exe batchpath]]
return "batchroot = $bp"
}
}