That wasn't the point, but it's a good solution--better
than mine!
Could you give us a patch whereby we specify the
target interpreter also?
BTW, I forgot the line which actually runs the script
>rvt----------
>#!/usr/bin/ksh
>chmod +x $1
>echo #!/usr/local/bin/expectk > tmp.tcl; cat $1 >> tmp.tcl; mv -f tmp.tcl $1
./$1
--jim
------------------------
From: AA van Raalte <[EMAIL PROTECTED]>
Subject: Re: [vtcl] using expectk in vtcl
Date: Wed, 28 Jan 1998 19:03:26 +0000
To: [EMAIL PROTECTED]
I patched vtcl to change the mode of the saved file. The patch follows.
Alvin.
diff -ru ../vtcl.orig/lib/file.tcl ./lib/file.tcl
--- ../vtcl.orig/lib/file.tcl Wed May 28 03:34:04 1997
+++ ./lib/file.tcl Wed Jul 9 20:51:39 1997
@@ -181,9 +181,11 @@
if {[file exists $file] == 1} {
file rename -force ${file} ${file}.bak
}
- set output [open $file w]
if {[array get env PATH_TO_WISH] != ""} {
+ set output [open $file w 0777]
puts $output "#!$env(PATH_TO_WISH)"
+ } else {
+ set output [open $file w]
}
puts $output "[subst $vTcl(head,proj)]\n"
if {$vTcl(save) == "all"} {
In message <Chameleon.885921295.jkraai@cdra1509>, Jim Kraai writes:
>Isaac,
>
>Executing w/ expectk:
>Since I have to 'chmod +x prog.tcl' every time I want to
>run a newly saved vtcl app, I wrote a little script to
>doit called rvt (Run vtcl app). When I need to change the
>shell, I just add a line to change the reference from wish
>to expectk. If I can remember it right, here it is:
>
>rvt----------
>#!/usr/bin/ksh
>chmod +x $1
>echo #!/usr/local/bin/expectk > tmp.tcl; cat $1 >> tmp.tcl; mv -f
tmp.tcl $1
>
---------------------------------------------------------------------------
To unsubscribe from the Visual Tcl mailing list, please send a message
to [EMAIL PROTECTED] with "unsubscribe vtcl [EMAIL PROTECTED]" in the
message body (where [EMAIL PROTECTED] is your e-mail address).
---------------End of Original Message-----------------
---------------------------------------------------------------------------
To unsubscribe from the Visual Tcl mailing list, please send a message
to [EMAIL PROTECTED] with "unsubscribe vtcl [EMAIL PROTECTED]" in the
message body (where [EMAIL PROTECTED] is your e-mail address).