From 62acdb79a21594cd43c8b81e4f73b136dc90304a Mon Sep 17 00:00:00 2001 From: Ferdi Franceschini Date: Tue, 6 Dec 2011 17:31:08 +1100 Subject: [PATCH] Allow user to specify the server path for taipan and lyrebird r3315 | ffr | 2011-12-06 17:31:08 +1100 (Tue, 06 Dec 2011) | 2 lines --- .../TEST_SICS/fakeDMC/mkSimAxes.tcl | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) diff --git a/site_ansto/instrument/TEST_SICS/fakeDMC/mkSimAxes.tcl b/site_ansto/instrument/TEST_SICS/fakeDMC/mkSimAxes.tcl index 614f465e..b32bce70 100755 --- a/site_ansto/instrument/TEST_SICS/fakeDMC/mkSimAxes.tcl +++ b/site_ansto/instrument/TEST_SICS/fakeDMC/mkSimAxes.tcl @@ -80,15 +80,24 @@ proc mkSimAxes {instrument} { } } -proc main {instrument args} { - cd ../sics/server; +proc main {instrument sicspath args} { + set currDir [pwd] + cd $sicspath; loadConfig $args; - cd ../../fakeDMC; + cd $currDir; mkSimAxes $instrument; } if {$tcl_interactive==0} { -puts "arguments = $argv" - main $argv config/motors/motor_configuration.tcl; + puts "arguments($argc) = $argv" + switch $argc { + 1 { main $argv ../sics/server config/motors/motor_configuration.tcl } + 2 { main [lindex $argv 0] [lindex $argv 1] config/motors/motor_configuration.tcl } + default { + puts "Usage: ./mkSimAxes.tcl " + puts "or : ./mkSimAxes.tcl " + puts "eg : ./mkSimAxes.tcl platypus ../sics/newserver" + } + } }