Artifact 07e25e6903cbac968badeca489ca3ecb43052a2a:
- Executable file
kitdll/buildsrc/kitdll-0.0/stringify.tcl
— part of check-in
[424322801f]
at
2010-09-26 04:51:16
on branch trunk
— Got KitDLL storage into workable state
Renamed some files for consistency
Added basic Makefile (user: rkeene, size: 405) [annotate] [blame] [check-ins using] [more...]
- Executable file kitsh/buildsrc/kitsh-0.0/stringify.tcl — part of check-in [0aa038624e] at 2010-09-26 04:41:08 on branch trunk — Updated to not produce spurious newline (user: rkeene, size: 405) [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 -nonewline [stringifyfile $file] } exit 0