您好,登錄后才能下訂單哦!
#!/bin/bash #example: #usrname='svnuser' #passwd='svnpassword' #svn_link="http://url/svn_dir" #svn_dir="target_dir" usrname=$1 passwd=$2 svn_link=$3 svn_dir=$4 svn_flag=".svn" cmd=$(rpm -qa|grep "expect") if [ $? -ne 0 ];then yum -y install expect fi cd ${svn_dir} if [ -d ${svn_flag} ]&&[ "x${svn_link}" != "x" ] then /usr/bin/expect <<-EOF set timeout 120 spawn svn co ${svn_link} . --username ${usrname} --password ${passwd} expect { "*(yes/no)?*" { send "yes\r";exp_continue ;} } EOF else /usr/bin/expect <<-EOF set timeout 120 spawn svn update expect { "*Password for 'admin':*" { send "${passwd}\r";exp_continue } "*(yes/no)?*" { send "yes\r";exp_continue ;} } EOF fi
免責聲明:本站發布的內容(圖片、視頻和文字)以原創、轉載和分享為主,文章觀點不代表本網站立場,如果涉及侵權請聯系站長郵箱:is@yisu.com進行舉報,并提供相關證據,一經查實,將立刻刪除涉嫌侵權內容。