linux svn update后端自动运行(计划任务)

linux svn update后端自动运行(计划任务)

#!/usr/bin/expect -f
## AUTHOR: Meitar Moscovitz
# DATE : Thu Jun 21 16:32:42 EDT 2007#

set USER niuyufu
set PASS niuyufu123

# the working copy we're going to update
set WC  /root/resume_parse_manager
set LOG /root/fsdfsuu

set SVNBIN /usr/bin/svn

set timeout 30

spawn $SVNBIN update -r HEAD --force $WC

expect {
    "Password for 'root': " { send "\r"; exp_continue; }
    "*Username:*" { send "$USER\r";exp_continue; }
    "*Password for '*':*" { send "$PASS\r";exp_continue; }
    "*Store password unencrypted (yes/no)?*" { send "no\r";exp_continue; }
}
                        


下面的可以放计划任务了。

你可能感兴趣的:(shell编程)