#!/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
分享名稱:svn調(diào)用腳本(三)
文章路徑:http://chinadenli.net/article46/ppcghg.html
成都網(wǎng)站建設(shè)公司_創(chuàng)新互聯(lián),為您提供網(wǎng)站維護(hù)、網(wǎng)站設(shè)計(jì)、網(wǎng)頁(yè)設(shè)計(jì)公司、定制開發(fā)、網(wǎng)站策劃、網(wǎng)站導(dǎo)航
聲明:本網(wǎng)站發(fā)布的內(nèi)容(圖片、視頻和文字)以用戶投稿、用戶轉(zhuǎn)載內(nèi)容為主,如果涉及侵權(quán)請(qǐng)盡快告知,我們將會(huì)在第一時(shí)間刪除。文章觀點(diǎn)不代表本網(wǎng)站立場(chǎng),如需處理請(qǐng)聯(lián)系客服。電話:028-86922220;郵箱:631063699@qq.com。內(nèi)容未經(jīng)允許不得轉(zhuǎn)載,或轉(zhuǎn)載時(shí)需注明來(lái)源: 創(chuàng)新互聯(lián)