X-Git-Url: https://git.stg.codes/stg.git/blobdiff_plain/8c6fa3fbaccc22127280bf77a48fab5a3ee0716e..46b0747592074017ff0ea4b33d4a7194235886e5:/make_tarball/get_from_cvs diff --git a/make_tarball/get_from_cvs b/make_tarball/get_from_cvs new file mode 100755 index 00000000..362f4029 --- /dev/null +++ b/make_tarball/get_from_cvs @@ -0,0 +1,58 @@ +#!/usr/bin/expect + +# login_cvs host password + +set user [lindex $argv 0] +set pass [lindex $argv 1] +set host [lindex $argv 2] +set cvsroot [lindex $argv 3] +set module [lindex $argv 4] +set dir [lindex $argv 5] + +set timeout 30 + +send_user "checkout module $module"; + +spawn ssh $user@$host +expect { + "(yes/no)? " { + send "yes\r" + send_user "Key accepted"; + } + "assword:" { + close + send_user "Key accepting dont needed"; + } + } + +spawn cvs -d :ext:$user@$host:$cvsroot co -N -d $dir $module +expect { + "assword:" { + send "$pass\r" + expect { + "assword:" { + send_user "

cvs checkout $module failed. Incorrect password

"; + exit 1 + } + "aborted" { + send_user "

cvs checkout $module failed.

"; + exit 1 + } + expect eof { + if {[lindex [wait] 3]} { + send_user "

cvs checkout $module failed.

" + exit 1 + } + } + } + } + + "aborted" { + send_user "

cvs checkout $module failed.

"; + exit 1 + } + } + + + +