开发者

Update SVN repository within web page

开发者 https://www.devze.com 2023-03-29 05:09 出处:网络
I want to update server\'s SVN repository on server\'s URL request, so I user CGI shell script with Apache but it does not work as I needed. It\'s source:

I want to update server's SVN repository on server's URL request, so I user CGI shell script with Apache but it does not work as I needed. It's source:

#!/bin/sh    
cat << EOF
Content-Type: text/html

<html>
<head>
<title>"SVN repository update.</title>
</head>
<body>
<h1>"SVN repository updated:</h1>
EOF
echo `svn --help`
echo `svn`
echo `svn co`
echo `svn update /var/www/my_svn_repository`
echo `date`
cat << EOF
</body>
</html>
EOF

"echo date" and "echo svn --help" DO work - all other echos does not work (so svn repository is not updated). Why is开发者_如何学Python this so?


Well, svn and svn co by themselves are not valid commands; they'll just print a help message and exit. I suspect the last one isn't, either; the path shouldn't point to the repository, but to the local working copy. Finally, it may matter who runs the script -- their ~/.svn directory will contain necessary information about the repository (the username and password to use for a remote repository, for example). You need to get a script that actually successfully does your update, first, and then try to turn it into a CGI script.

0

精彩评论

暂无评论...
验证码 换一张
取 消