mirror of
https://github.com/renbaoshuo/S2OJ.git
synced 2024-11-22 22:48:42 +00:00
c5ef73dc76
The installation files are dirty when they are outside of the folder. It now looks not so mess. And there is no need to place empty jdk files. 果断删除之。
35 lines
606 B
Bash
35 lines
606 B
Bash
if [ $# -ne 1 ]
|
|
then
|
|
echo 'invalid argument'
|
|
exit 1
|
|
fi
|
|
|
|
path=/var/svn/problem/$1
|
|
mkdir $path
|
|
svnadmin create $path
|
|
cat >$path/conf/svnserve.conf <<EOD
|
|
[general]
|
|
anon-access = none
|
|
auth-access = write
|
|
password-db = passwd
|
|
EOD
|
|
|
|
svnusr="our-root"
|
|
svnpwd="__our_root_password__"
|
|
|
|
cat >$path/conf/passwd <<EOD
|
|
[users]
|
|
$svnusr = $svnpwd
|
|
EOD
|
|
|
|
mkdir $path/cur
|
|
cd $path/cur
|
|
svn checkout svn://127.0.0.1/problem/$1 --username $svnusr --password $svnpwd
|
|
mkdir /var/uoj_data/$1
|
|
|
|
cat >$path/hooks/post-commit <<EODEOD
|
|
#!/bin/sh
|
|
/var/svn/problem/post-commit.sh $1
|
|
EODEOD
|
|
chmod +x $path/hooks/post-commit
|