File: PatchVersion

package info (click to toggle)
exmh 1:2.9.0-1
  • links: PTS
  • area: main
  • in suites: buster
  • size: 4,216 kB
  • sloc: tcl: 38,046; perl: 1,647; makefile: 130; sh: 101; exp: 75; csh: 9; sed: 2
file content (16 lines) | stat: -rwxr-xr-x 360 bytes parent folder | download | duplicates (11)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#!/bin/sh 
# \
exec tclsh "$0" ${1+"$@"}

set version [lindex $argv 0]
set out stdout
set in stdin
while {[gets $in line] >= 0} {
   if {[regexp "^set vers" $line]} {
	puts $out [list set vers $version]
    } elseif {[regexp "^set date" $line]} {
	puts $out [list set date [clock format [clock seconds] -format %m/%d/%Y]]
    } else {
	puts $out $line
    }
}