SVN update in post-commit hook

Standard

假设服务器对外访问域名为http://yemaosheng.com/ 网站文件存放于/var/www/html/ye/
修改SVN库中post-commit文件
操作如:
cd /var/www/svn/repos/hooks/
cp post-commit.tmpl post-commit
chown apache:apache post-commit
chmod a+x post-commit
vi post-commit
#!/bin/sh
REPOS=”$1″
REV=”$2″
svn update /var/www/html/ye –username svnuser1 –password 123456

PS:以上操作应该都没错,但我在我FC8的服务器上测试了没有效果,估计是UTF-8的问题.
我只好先用crontab每5分钟运行一次sh来代替.
#!/bin/sh
export LANG=zh_CN.UTF-8 #注:这一行害我折腾了几小时
svn update /var/www/html/ye –username root –password 123456

4 thoughts on “SVN update in post-commit hook

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.