sl@0: # cvtEOL.tcl -- sl@0: # sl@0: # This file contains a script to parse a Tcl/Tk distribution and sl@0: # convert the EOL from \n to \r on all text files. sl@0: # sl@0: # Copyright (c) 1996-1997 by Sun Microsystems, Inc. sl@0: # sl@0: # SCCS: @(#) cvtEOL.tcl 1.1 97/01/30 11:33:33 sl@0: # sl@0: sl@0: # sl@0: # Convert files in the distribution to Mac style sl@0: # sl@0: sl@0: set distDir [lindex $argv 0] sl@0: sl@0: set dirs {unix mac generic win library compat tests unix/dltest \ sl@0: library/demos library/demos/images bitmaps xlib xlib/X11 .} sl@0: set files {*.c *.y *.h *.r *.tcl *.test *.rc *.bc *.vc *.bmp *.html \ sl@0: *.in *.notes *.terms all defs \ sl@0: README ToDo changes tclIndex configure install-sh mkLinks \ sl@0: square widget rmt ixset hello browse rolodex tcolor timer} sl@0: sl@0: foreach x $dirs { sl@0: if [catch {cd $distDir/$x}] continue sl@0: puts "Working on $x..." sl@0: foreach y [eval glob $files] { sl@0: exec chmod 666 $y sl@0: exec cp $y $y.tmp sl@0: exec tr \012 \015 < $y.tmp > $y sl@0: exec chmod 444 $y sl@0: exec rm $y.tmp sl@0: } sl@0: } sl@0: