move folder tasmad
r3086 | jgn | 2011-03-29 15:32:07 +1100 (Tue, 29 Mar 2011) | 1 line
This commit is contained in:
committed by
Douglas Clowes
parent
e92dce3948
commit
66e3096b24
29
site_ansto/instrument/tas/config/tasmad/sicscommon/batch.tcl
Normal file
29
site_ansto/instrument/tas/config/tasmad/sicscommon/batch.tcl
Normal file
@@ -0,0 +1,29 @@
|
||||
#--------------------------------------------
|
||||
# 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"
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user