mirror of
https://github.com/renbaoshuo/S2OJ.git
synced 2024-11-30 02:46:21 +00:00
69912ba9b3
* feat(install, svn): remove svn Remove everything related to svn. Rename uoj-svn-lib to uoj-data-lib. Save preparing problem data to /var/uoj_data/prepare/problem_id. * Typo: uoj_date -> uoj_data * add: backward compatibility BREAKING CHANGE: Preparing problem data location is changed You need to move files from /var/svn/problem/{id}/cur/{id}/1 to /var/uoj_data/upload/{id}
30 lines
1.1 KiB
Bash
30 lines
1.1 KiB
Bash
#!/bin/sh
|
|
|
|
sudo adduser judger --gecos "" --disabled-password
|
|
|
|
mv /root/jdk-7u76-linux-x64.tar.gz /root/jdk-8u31-linux-x64.tar.gz /root/conf.json /home/judger
|
|
chown judger /home/judger/jdk-7u76-linux-x64.tar.gz /home/judger/jdk-8u31-linux-x64.tar.gz /home/judger/conf.json
|
|
chgrp judger /home/judger/jdk-7u76-linux-x64.tar.gz /home/judger/jdk-8u31-linux-x64.tar.gz /home/judger/conf.json
|
|
|
|
mkdir /var/uoj_data_copy
|
|
chown judger /var/uoj_data_copy
|
|
|
|
su judger <<EOD
|
|
cd ~
|
|
git clone https://github.com/Universal/UOJ-System.git
|
|
ln -s UOJ-System/judge_client/1 judge_client
|
|
cd judge_client
|
|
echo '#define UOJ_WORK_PATH "/home/judger/judge_client/uoj_judger"' >uoj_judger/include/uoj_work_path.h
|
|
make
|
|
ln -s /var/uoj_data_copy ~/judge_client/uoj_judger/data
|
|
|
|
mkdir ~/judge_client/uoj_judger/run/runtime
|
|
mv ~/jdk-7u76-linux-x64.tar.gz ~/jdk-8u31-linux-x64.tar.gz ~/judge_client/uoj_judger/run/runtime
|
|
cd ~/judge_client/uoj_judger/run/runtime
|
|
tar -xzf jdk-7u76-linux-x64.tar.gz
|
|
tar -xzf jdk-8u31-linux-x64.tar.gz
|
|
|
|
mv ~/conf.json ~/judge_client/.conf.json
|
|
chmod 600 ~/judge_client/.conf.json
|
|
EOD
|