diff options
author | nijtmans <nijtmans> | 2010-05-21 12:18:17 (GMT) |
---|---|---|
committer | nijtmans <nijtmans> | 2010-05-21 12:18:17 (GMT) |
commit | 5b13f1d368442b4edfeba1b28cdd7546f4e27256 (patch) | |
tree | c039072f1625d73a9fe7bb523fc746025a610fbc /tools/installData.tcl | |
parent | 06144449abc54195262aec969ae727fad584e90e (diff) | |
download | tcl-5b13f1d368442b4edfeba1b28cdd7546f4e27256.zip tcl-5b13f1d368442b4edfeba1b28cdd7546f4e27256.tar.gz tcl-5b13f1d368442b4edfeba1b28cdd7546f4e27256.tar.bz2 |
installData.tcl: Make sure that copyDir only receives normalized paths.
tclPlatDecls.h: Fix <tchar.h> inclusion for CYGWIN.
tclPathObj.c: Fix Tcl_SetStringObj usage for CYGWIN.
*.c: Fix various minor other gcc warnings, like signed<->unsigned mismatch.
Diffstat (limited to 'tools/installData.tcl')
-rw-r--r-- | tools/installData.tcl | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/tools/installData.tcl b/tools/installData.tcl index cf067a3..5bdcd0c 100644 --- a/tools/installData.tcl +++ b/tools/installData.tcl @@ -1,6 +1,6 @@ #!/bin/sh #\ - exec tclsh "$0" ${1+"$@"} +exec tclsh "$0" ${1+"$@"} #---------------------------------------------------------------------- # @@ -16,38 +16,38 @@ # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: installData.tcl,v 1.1 2004/08/18 19:59:09 kennykb Exp $ +# RCS: @(#) $Id: installData.tcl,v 1.1.16.1 2010/05/21 12:18:17 nijtmans Exp $ # #---------------------------------------------------------------------- -proc copyDir { d1 d2 } { +proc copyDir {d1 d2} { - puts [format {%*sCreating %s} [expr { 4 * [info level] }] {} \ + puts [format {%*sCreating %s} [expr {4 * [info level]}] {} \ [file tail $d2]] file delete -force -- $d2 file mkdir $d2 - + foreach ftail [glob -directory $d1 -nocomplain -tails *] { set f [file join $d1 $ftail] - if { [file isdirectory $f] && [string compare CVS $ftail] } { + if {[file isdirectory $f] && [string compare CVS $ftail]} { copyDir $f [file join $d2 $ftail] - } elseif { [file isfile $f] } { + } elseif {[file isfile $f]} { file copy -force $f [file join $d2 $ftail] - if { $::tcl_platform(platform) eq {unix} } { + if {$::tcl_platform(platform) eq {unix}} { file attributes [file join $d2 $ftail] -permissions 0644 } else { file attributes [file join $d2 $ftail] -readonly 1 } } } - - if { $::tcl_platform(platform) eq {unix} } { + + if {$::tcl_platform(platform) eq {unix}} { file attributes $d2 -permissions 0755 } else { file attributes $d2 -readonly 1 } -} - -copyDir [lindex $argv 0] [lindex $argv 1] +} + +copyDir [file normalize [lindex $argv 0]] [file normalize [lindex $argv 1]] |