Load environment configuration file taipan_setup.txt if it exists.

This commit is contained in:
Ferdi Franceschini
2013-05-06 21:23:41 +10:00
parent 5c76f7a243
commit da0b00c938
2 changed files with 17 additions and 0 deletions

View File

@@ -0,0 +1,16 @@
proc load_setup {fpath} {
# restore ../log/default_status.tcl
if {[file exists $fpath] == 0} {
clientput "WARNING: Environment configuration file $fpath doesn't exist"
return
}
set ch [open $fpath r]
set setup [read $ch]
foreach {s f} $setup {
if {$f} {
set fn config/setup/${s}_setup.tcl
fileeval $fn
}
}
}

View File

@@ -1,3 +1,4 @@
config/load_setup.tcl
config/source/source_common.tcl
config/anticollider/anticollider_common.tcl
config/plc/plc_common_1.tcl