This is the mail archive of the ecos-patches@sources.redhat.com mailing list for the eCos project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Using ecosadmin.tcl with the latest Cygwin Tcl shell


Hi Jifl

Thanks for your effort in getting $@ to work in this context. Here's my 
final solution in the form of a test script:

#!/bin/sh
# \
exec sh -c 'for tclshell in tclsh tclsh83 cygtclsh80 ; do \
        if ( echo | $tclshell ) 2> /dev/null ; then \
            exec $tclshell "$0" "$@" ; \
        fi \
    done ; \
    echo "Cannot find Tcl shell" ; exit 1 \
    ' "$0" "$@"

puts "argv0 = $argv0"
foreach arg $argv {
    puts "arg = $arg"
}

John

-----Original Message-----
From: Jonathan Larmour
Date: Tuesday 28 Jan 2003 02:44
Subject: Re: Using ecosadmin.tcl with the latest Cygwin Tcl shell

> The following test script works:
>
> #!/bin/sh
> # \
> exec sh -c 'if ( echo | cygtclsh80 ) 2>/dev/null ; then \
>        exec cygtclsh80 "${0}" "$@" ; \
> fi' "$0" "$@"


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]