# HG changeset patch # User jld # Date 1043844301 0 # Node ID 181928a65a25d1310ddfd4909c191d6e79a9bf3f # Parent bd1ddaaaf79662bad7f504e2c5d4e8d481a986f9 * ecosadmin.tcl, fs/rom/current/support/file2c.tcl, hal/arm/aeb/current/src/flash_cksum.tcl, hal/arm/e7t/current/src/flash_cksum.tcl, hal/mips/ref4955/current/misc/slow_cat.tcl, hal/mips/ref4955/current/misc/swap4.tcl, pkgconf/fixhtml.tcl, services/memalloc/common/current/src/heapgen.tcl: Accommodate tclsh83 on Cygwin in Tcl scripts. diff --git a/packages/ChangeLog b/packages/ChangeLog --- a/packages/ChangeLog +++ b/packages/ChangeLog @@ -1,3 +1,11 @@ +2003-01-29 John Dallaway + + * ecosadmin.tcl: Accommodate UNIX-style paths under Cygwin when + adding packages. + + * pkgconf/fixhtml.tcl: Accommodate latest Cygwin Tcl shell + (tclsh83.exe) + 2003-01-24 Knud Woehler 2003-01-24 Mark Salter diff --git a/packages/ecosadmin.tcl b/packages/ecosadmin.tcl --- a/packages/ecosadmin.tcl +++ b/packages/ecosadmin.tcl @@ -1,15 +1,9 @@ -#!/bin/sh -# these lines restart using the tcl shell \ - exec sh -c "if ( echo | tclsh ) 2>/dev/null ; then \ - exec tclsh \"${0}\" ${1+${*}} ; \ - elif ( echo | tclsh83 ) 2>/dev/null ; then \ - exec tclsh83 \"${0}\" ${1+${*}} ; \ - elif ( echo | cygtclsh80 ) 2>/dev/null ; then \ - exec cygtclsh80 \"${0}\" ${1+${*}} ; \ - else \ - echo Could not find TCL interpreter ; \ - exit 1 ; \ - fi" +#!/bin/bash +# restart using a Tcl shell \ + exec sh -c 'for tclshell in tclsh tclsh83 cygtclsh80 ; do \ + ( echo | $tclshell ) 2> /dev/null && exec $tclshell "`( cygpath -w \"$0\" ) 2> /dev/null || echo $0`" "$@" ; \ + done ; \ + echo "ecosadmin.tcl: cannot find Tcl shell" ; exit 1' "$0" "$@" # {{{ Banner @@ -467,12 +461,9 @@ proc ecosadmin::parse_arguments { argv0 } } - # Under Windows it is desirable to do some checking on any directories that - # have been provided. Some cygwin pathnames that a user might supply are - # not acceptable to Tcl. - if { $ecosadmin::windows_host } { - set ecosadmin::component_repository [get_pathname_for_tcl $ecosadmin::component_repository] - } + # Convert user-specified UNIX-style Cygwin pathnames to Windows Tcl-style as necessary + set ecosadmin::component_repository [get_pathname_for_tcl $ecosadmin::component_repository] + set ecosadmin::add_package [get_pathname_for_tcl $ecosadmin::add_package] } # diff --git a/packages/fs/rom/current/ChangeLog b/packages/fs/rom/current/ChangeLog --- a/packages/fs/rom/current/ChangeLog +++ b/packages/fs/rom/current/ChangeLog @@ -1,3 +1,8 @@ +2003-01-29 John Dallaway + + * support/file2c.tcl: Accommodate latest Cygwin Tcl shell + (tclsh83.exe) + 2002-04-15 Bart Veer * support/file2c.tcl: diff --git a/packages/fs/rom/current/support/file2c.tcl b/packages/fs/rom/current/support/file2c.tcl --- a/packages/fs/rom/current/support/file2c.tcl +++ b/packages/fs/rom/current/support/file2c.tcl @@ -1,13 +1,9 @@ -#!/bin/sh -# these lines restart using the tcl shell \ - exec sh -c "if ( echo | tclsh ) 2>/dev/null ; then \ - exec tclsh \"${0}\" ${1+${*}} ; \ - elif ( echo | cygtclsh80 ) 2>/dev/null ; then \ - exec cygtclsh80 \"${0}\" ${1+${*}} ; \ - else \ - echo Could not find TCL interpreter ; \ - exit 1 ; \ - fi" +#!/bin/bash +# restart using a Tcl shell \ + exec sh -c 'for tclshell in tclsh tclsh83 cygtclsh80 ; do \ + ( echo | $tclshell ) 2> /dev/null && exec $tclshell "`( cygpath -w \"$0\" ) 2> /dev/null || echo $0`" "$@" ; \ + done ; \ + echo "file2c.tcl: cannot find Tcl shell" ; exit 1' "$0" "$@" #=============================================================================== # diff --git a/packages/hal/arm/aeb/current/ChangeLog b/packages/hal/arm/aeb/current/ChangeLog --- a/packages/hal/arm/aeb/current/ChangeLog +++ b/packages/hal/arm/aeb/current/ChangeLog @@ -1,3 +1,8 @@ +2003-01-29 John Dallaway + + * src/flash_cksum.tcl: Accommodate latest Cygwin Tcl shell + (tclsh83.exe) + 2002-05-23 Jesper Skov * cdl/hal_arm_aeb.cdl: Don't run cache tests. diff --git a/packages/hal/arm/aeb/current/src/flash_cksum.tcl b/packages/hal/arm/aeb/current/src/flash_cksum.tcl --- a/packages/hal/arm/aeb/current/src/flash_cksum.tcl +++ b/packages/hal/arm/aeb/current/src/flash_cksum.tcl @@ -1,13 +1,9 @@ -#!/bin/sh -# these lines restart using the tcl shell \ - exec sh -c "if ( echo | tclsh ) 2>/dev/null ; then \ - exec tclsh \"${0}\" ${1+${*}} ; \ - elif ( echo | cygtclsh80 ) 2>/dev/null ; then \ - exec cygtclsh80 \"${0}\" ${1+${*}} ; \ - else \ - echo Could not find TCL interpreter ; \ - exit 1 ; \ - fi" +#!/bin/bash +# restart using a Tcl shell \ + exec sh -c 'for tclshell in tclsh tclsh83 cygtclsh80 ; do \ + ( echo | $tclshell ) 2> /dev/null && exec $tclshell "`( cygpath -w \"$0\" ) 2> /dev/null || echo $0`" "$@" ; \ + done ; \ + echo "flash_cksum.tcl: cannot find Tcl shell" ; exit 1' "$0" "$@" #=============================================================================== # diff --git a/packages/hal/arm/e7t/current/ChangeLog b/packages/hal/arm/e7t/current/ChangeLog --- a/packages/hal/arm/e7t/current/ChangeLog +++ b/packages/hal/arm/e7t/current/ChangeLog @@ -1,3 +1,8 @@ +2003-01-29 John Dallaway + + * src/flash_cksum.tcl: Accommodate latest Cygwin Tcl shell + (tclsh83.exe) + 2002-10-19 Jonathan Larmour * include/hal_platform_setup.h (PLATFORM_SETUP1): Only define if diff --git a/packages/hal/arm/e7t/current/src/flash_cksum.tcl b/packages/hal/arm/e7t/current/src/flash_cksum.tcl --- a/packages/hal/arm/e7t/current/src/flash_cksum.tcl +++ b/packages/hal/arm/e7t/current/src/flash_cksum.tcl @@ -1,13 +1,9 @@ -#!/bin/sh -# these lines restart using the tcl shell \ - exec sh -c "if ( echo | tclsh ) 2>/dev/null ; then \ - exec tclsh \"${0}\" ${1+${*}} ; \ - elif ( echo | cygtclsh80 ) 2>/dev/null ; then \ - exec cygtclsh80 \"${0}\" ${1+${*}} ; \ - else \ - echo Could not find TCL interpreter ; \ - exit 1 ; \ - fi" +#!/bin/bash +# restart using a Tcl shell \ + exec sh -c 'for tclshell in tclsh tclsh83 cygtclsh80 ; do \ + ( echo | $tclshell ) 2> /dev/null && exec $tclshell "`( cygpath -w \"$0\" ) 2> /dev/null || echo $0`" "$@" ; \ + done ; \ + echo "flash_cksum.tcl: cannot find Tcl shell" ; exit 1' "$0" "$@" #=============================================================================== # diff --git a/packages/hal/mips/ref4955/current/ChangeLog b/packages/hal/mips/ref4955/current/ChangeLog --- a/packages/hal/mips/ref4955/current/ChangeLog +++ b/packages/hal/mips/ref4955/current/ChangeLog @@ -1,3 +1,8 @@ +2003-01-29 John Dallaway + + * misc/slow_cat.tcl, misc/swap4.tcl: + Accommodate latest Cygwin Tcl shell (tclsh83.exe) + 2002-08-06 Gary Thomas 2002-08-06 Motoya Kurotsu diff --git a/packages/hal/mips/ref4955/current/misc/slow_cat.tcl b/packages/hal/mips/ref4955/current/misc/slow_cat.tcl --- a/packages/hal/mips/ref4955/current/misc/slow_cat.tcl +++ b/packages/hal/mips/ref4955/current/misc/slow_cat.tcl @@ -1,13 +1,9 @@ -#!/bin/sh -# these lines restart using the tcl shell \ - exec sh -c "if ( echo | tclsh ) 2>/dev/null ; then \ - exec tclsh \"${0}\" ${1+${*}} ; \ - elif ( echo | cygtclsh80 ) 2>/dev/null ; then \ - exec cygtclsh80 \"${0}\" ${1+${*}} ; \ - else \ - echo Could not find TCL interpreter ; \ - exit 1 ; \ - fi" +#!/bin/bash +# restart using a Tcl shell \ + exec sh -c 'for tclshell in tclsh tclsh83 cygtclsh80 ; do \ + ( echo | $tclshell ) 2> /dev/null && exec $tclshell "`( cygpath -w \"$0\" ) 2> /dev/null || echo $0`" "$@" ; \ + done ; \ + echo "slow_cat.tcl: cannot find Tcl shell" ; exit 1' "$0" "$@" # Can be used like this: # Get flash ready for programming using Minicom or similar diff --git a/packages/hal/mips/ref4955/current/misc/swap4.tcl b/packages/hal/mips/ref4955/current/misc/swap4.tcl --- a/packages/hal/mips/ref4955/current/misc/swap4.tcl +++ b/packages/hal/mips/ref4955/current/misc/swap4.tcl @@ -1,13 +1,9 @@ -#!/bin/sh -# these lines restart using the tcl shell \ - exec sh -c "if ( echo | tclsh ) 2>/dev/null ; then \ - exec tclsh \"${0}\" ${1+${*}} ; \ - elif ( echo | cygtclsh80 ) 2>/dev/null ; then \ - exec cygtclsh80 \"${0}\" ${1+${*}} ; \ - else \ - echo Could not find TCL interpreter ; \ - exit 1 ; \ - fi" +#!/bin/bash +# restart using a Tcl shell \ + exec sh -c 'for tclshell in tclsh tclsh83 cygtclsh80 ; do \ + ( echo | $tclshell ) 2> /dev/null && exec $tclshell "`( cygpath -w \"$0\" ) 2> /dev/null || echo $0`" "$@" ; \ + done ; \ + echo "swap4.tcl: cannot find Tcl shell" ; exit 1' "$0" "$@" proc filter { input_file output_file } { set input_fd [open $input_file "r"] diff --git a/packages/pkgconf/fixhtml.tcl b/packages/pkgconf/fixhtml.tcl --- a/packages/pkgconf/fixhtml.tcl +++ b/packages/pkgconf/fixhtml.tcl @@ -1,6 +1,9 @@ -#!/bin/sh -# the next line restarts using tclsh \ - exec tclsh "$0" ${1+"$@"} +#!/bin/bash +# restart using a Tcl shell \ + exec sh -c 'for tclshell in tclsh tclsh83 cygtclsh80 ; do \ + ( echo | $tclshell ) 2> /dev/null && exec $tclshell "`( cygpath -w \"$0\" ) 2> /dev/null || echo $0`" "$@" ; \ + done ; \ + echo "fixhtml.tcl: cannot find Tcl shell" ; exit 1' "$0" "$@" #=============================================================================== # diff --git a/packages/services/memalloc/common/current/ChangeLog b/packages/services/memalloc/common/current/ChangeLog --- a/packages/services/memalloc/common/current/ChangeLog +++ b/packages/services/memalloc/common/current/ChangeLog @@ -1,3 +1,8 @@ +2003-01-29 John Dallaway + + * src/heapgen.tcl: Accommodate latest Cygwin Tcl shell + (tclsh83.exe) + 2002-05-10 Jonathan Larmour * tests/heaptest.c (test_pat): Make failure messages clearer. diff --git a/packages/services/memalloc/common/current/src/heapgen.tcl b/packages/services/memalloc/common/current/src/heapgen.tcl --- a/packages/services/memalloc/common/current/src/heapgen.tcl +++ b/packages/services/memalloc/common/current/src/heapgen.tcl @@ -1,16 +1,9 @@ -#!/bin/sh -# these lines restart using the tcl shell \ - exec sh -c "if ( echo | cygtclsh80 ) 2>/dev/null ; then \ - exec cygtclsh80 \"${0}\" \"\`echo \\\"\\\`cygpath -w \\\"${1}\\\" \\\`\\\" |sed 's#\\\\\\\\#/#g'\`\" \"\`echo \\\"\\\`cygpath -w \\\"${2}\\\" \\\`\\\" |sed 's#\\\\\\\\#/#g'\`\" ; \ - elif ( echo | tclsh ) 2>/dev/null ; then \ - exec tclsh \"${0}\" ${1+${*}} ; \ - else \ - echo Could not find TCL interpreter ; \ - exit 1 ; \ - fi" - -#FIXMEFIXMEFIXME the above should use cygpath -ws, not cygpath -w but we -#can't rely on everyone having up-to-date cygwin tools (1.1.5+) +#!/bin/bash +# restart using a Tcl shell \ + exec sh -c 'for tclshell in tclsh tclsh83 cygtclsh80 ; do \ + ( echo | $tclshell ) 2> /dev/null && exec $tclshell "`( cygpath -w \"$0\" ) 2> /dev/null || echo $0`" "$@" ; \ + done ; \ + echo "heapgen.tcl: cannot find Tcl shell" ; exit 1' "$0" "$@" #=============================================================================== #