Artifact 100818685a0085e62371bdb2f3198131c7e323c1:
- Executable file
kitsh/buildsrc/kitsh-0.0/stringify.tcl
— part of check-in
[44e0b4f94c]
at
2010-09-26 04:40:56
on branch trunk
— Added preliminary support for using a Tcl-based metakit reader (mk4tcl.tcl,
based off ReadKit) if Mk4tcl support not found
Updated mk4tcl to cleanup if build fails, to prevent false detection (user: rkeene, size: 394) [annotate] [blame] [check-ins using]
#! /usr/bin/env tclsh proc stringifyfile {filename {key 0}} { catch { set fd [open $filename r] } if {![info exists fd]} { return "" } set data [read -nonewline $fd] close $fd foreach line [split $data \n] { set line [string map [list "\\" "\\\\" "\"" "\\\""] $line] append ret " \"$line\\n\"\n" } return $ret } foreach file $argv { puts [stringifyfile $file] } exit 0