svn同步至web目录

#!/bin/sh
#设定环境变量,如果没有设定可能会出现update报错
export LANG=zh_CN.UTF-8
REPOS="$1"
REV="$2"
SVN_PATH=/usr/bin/svn
WEB_PATH=/web/project
LOG_PATH=/tmp/svn_update.log
#/usr/bin/svn update --username user --password password $WEB_PATH --no-auth-cache
echo "nnn##########开始提交 " `date "+%Y-%m-%d %H:%M:%S"` '##################' >> $LOG_PATH
echo `whoami`,$REPOS,$REV >> $LOG_PATH
$SVN_PATH update --username user --password password $WEB_PATH --no-auth-cache >> $LOG_PATH
chown -R www:www $WEB_PATH

posted @ 2017-07-25 21:48  洋葱土豆随心匠  阅读(235)  评论(0编辑  收藏  举报