From: Jeff E. <gi...@gi...> - 2009-10-31 18:45:06
|
Add a way to get the interactive tcl prompt A new flag (halrun -T) invokes haltcl interactively after parsing the hal startup script. http://git.linuxcnc.org/?p=emc2.git;a=commitdiff;h=072a659 --- scripts/halrun.in | 7 ++++--- 1 files changed, 4 insertions(+), 3 deletions(-) diff --git a/scripts/halrun.in b/scripts/halrun.in index 66b20ee..fc6b4da 100644 --- a/scripts/halrun.in +++ b/scripts/halrun.in @@ -5,10 +5,11 @@ REALTIME=@REALTIME@ if [ $# -eq 0 ]; then set -- -kf; fi -INTERACTIVE=0 +INTERACTIVE= while true; do case $1 in - -I) INTERACTIVE=1; shift;; + -I) INTERACTIVE="halcmd -kf"; shift;; + -T) INTERACTIVE="haltcl"; shift;; -U) halcmd -R; halcmd stop; halcmd unload all; $REALTIME stop; exit;; *) break esac @@ -33,7 +34,7 @@ else halcmd $@; result=$? fi -if [ $INTERACTIVE -eq 1 ]; then halcmd -kf; fi +if [ ! -z "$INTERACTIVE" ]; then $INTERACTIVE; fi halcmd stop || result=$? halcmd unload all || result=$? |