os/persistentdata/persistentstorage/sqlite3api/TEST/TCL/tcldistribution/tools/cvtEOL.tcl
author sl
Tue, 10 Jun 2014 14:32:02 +0200
changeset 1 260cb5ec6c19
permissions -rw-r--r--
Update contrib.
     1 # cvtEOL.tcl --
     2 #
     3 # This file contains a script to parse a Tcl/Tk distribution and
     4 # convert the EOL from \n to \r on all text files.
     5 #
     6 # Copyright (c) 1996-1997 by Sun Microsystems, Inc.
     7 #
     8 # SCCS: @(#) cvtEOL.tcl 1.1 97/01/30 11:33:33
     9 #
    10 
    11 #
    12 # Convert files in the distribution to Mac style
    13 #
    14 
    15 set distDir [lindex $argv 0]
    16 
    17 set dirs {unix mac generic win library compat tests unix/dltest \
    18 	  library/demos library/demos/images bitmaps xlib xlib/X11 .}
    19 set files {*.c *.y *.h *.r *.tcl *.test *.rc *.bc *.vc *.bmp *.html \
    20 	   *.in *.notes *.terms all defs \
    21 	   README ToDo changes tclIndex configure install-sh mkLinks \
    22 	   square widget rmt ixset hello browse rolodex tcolor timer}
    23 
    24 foreach x $dirs {
    25   if [catch {cd $distDir/$x}] continue
    26   puts "Working on $x..."
    27   foreach y [eval glob $files] {
    28     exec chmod 666 $y
    29     exec cp $y $y.tmp
    30     exec tr \012 \015 < $y.tmp > $y
    31     exec chmod 444 $y
    32     exec rm $y.tmp
    33   }
    34 }
    35