diff options
author | N.N. <krzyszcz@users.sourceforge.net> | 2005-05-10 20:30:47 +0000 |
---|---|---|
committer | N.N. <krzyszcz@users.sourceforge.net> | 2005-05-10 20:30:47 +0000 |
commit | 2f98cf610081a6e3c4a4aadf4411dcc89b756db2 (patch) | |
tree | 282ed3657a8050ad790570dec4263fff67272f6b /pddp/pddpboot.tcl | |
parent | cdd23c6b9523654eb3bf03542021404888fdbcba (diff) |
toxy alpha17 and pddp alpha1 (see notes.txt for toxy, pddp and shared)
svn path=/trunk/externals/miXed/; revision=2941
Diffstat (limited to 'pddp/pddpboot.tcl')
-rwxr-xr-x | pddp/pddpboot.tcl | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/pddp/pddpboot.tcl b/pddp/pddpboot.tcl new file mode 100755 index 0000000..3cec684 --- /dev/null +++ b/pddp/pddpboot.tcl @@ -0,0 +1,32 @@ +#!/bin/sh +# \ +exec tclsh "$0" -- "$@" + +# Synopsis +# test run: +# ./pddpboot.tcl [root [port [path]]] +# from Pd: +# source pddpboot.tcl +# ::pddp::srvUse root (or ::pddp::srvStart root [port]) +# ::pddp::cliOpen path +# ... (more "::pddp::cliOpen" calls) ... +# ::pddp::srvStop + +if {[namespace exists ::pddp]} { ;# created by pddplink's setup + puts stderr "Booting pddp" + set ::pddp::testrun 0 +} else { + puts stderr "Booting pddp, test run..." + namespace eval ::pddp { variable testrun 1 } +} + +puts stderr "current directory: [pwd]" + +source pddpclient.tcl +source pddpserver.tcl + +if {[info exists ::pddp::theDir]} { + puts stderr "restoring directory: $::pddp::theDir" + cd $::pddp::theDir + unset ::pddp::theDir +} |