mirror of
https://github.com/rgaufman/live555.git
synced 2026-01-12 00:04:30 +08:00
27 lines
544 B
Tcl
Executable File
27 lines
544 B
Tcl
Executable File
#!/bin/sh
|
|
# the next line restarts using tclsh \
|
|
exec tclsh "$0" "$@"
|
|
|
|
set makefileName [lindex $argv 0]
|
|
set tmpfileName /tmp/rsftmp
|
|
|
|
set inFid [open $makefileName r]
|
|
set outFid [open $tmpfileName w]
|
|
|
|
while {![eof $inFid]} {
|
|
set line [gets $inFid]
|
|
if {[string match *\)\$* $line]} {
|
|
set pos [string first \)\$ $line]
|
|
set prefix [string range $line 0 $pos]
|
|
incr pos
|
|
set suffix [string range $line $pos end]
|
|
set line $prefix\ $suffix
|
|
}
|
|
|
|
puts $outFid $line
|
|
}
|
|
|
|
close $inFid
|
|
close $outFid
|
|
file rename -force $tmpfileName $makefileName
|