File: checkout

package info (click to toggle)
tklib 0.9-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 23,156 kB
  • sloc: tcl: 105,088; sh: 2,573; ansic: 792; pascal: 359; makefile: 69; sed: 53; exp: 21
file content (26 lines) | stat: -rw-r--r-- 528 bytes parent folder | download | duplicates (10)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
#!/usr/bin/expect

switch -- [llength $argv] {
    0 {
	set date "now"
	set dir .
    }
    1 {
	set date "now"
	set dir [lindex $argv 0]
    }
    default {
	set date [clock format [expr {[clock scan [lindex $argv 1]] + 24*60*60}] -format %Y%m%dT%H:%M:%S]
	set dir [lindex $argv 0]
    }
}

cd $dir

set cvsroot ":pserver:anonymous@tcllib.cvs.sourceforge.net:/cvsroot/tcllib"
spawn cvs -q -d$cvsroot login
expect -re "assword: "
send "\r"
system "cvs -q -d$cvsroot -z9 co -D \"$date\" tklib"
system "cvs -q -d$cvsroot logout"