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