svn钩子
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
|
#!/bin/sh
#修改为服务编码
export
.UTF-8
#Set variable
REPOS=
"$1"
REV=
"$2"
#svn安装脚本目录
SVN=
/usr/bin/svn
#这里设置为你的网站的根目录
WEB=
/www/web/music
#日志存放文件
LOG=
/www/log/svnLog/first
.txt
#update the code from the SVN
#demo是用户名 123456是密码
$SVN update $WEB --username carrot --password pwd666666 --non-interactive
chmod
755 -R $WEB
chown
-R www.www $WEB
#......................
if
[ $? == 0 ]
then
echo
"$REPOS"
"$REV"
>> $LOG
echo
`
date
` >> $LOG
echo
"##############################"
>> $LOG
fi
|