#!/bin/sh chmod +x /var/svn/uoj/hooks/post-commit chmod +x /var/svn/problem/new_problem.sh chmod +x /var/svn/problem/post-commit.sh svnserve -d -r /var/svn service mysql start service apache2 start cd /root svn co svn://127.0.0.1/uoj __svn_cert__ mv uoj_1 uoj/1 cd uoj svn add 1 svn ci -m "first commit" __svn_cert__ cd .. rm uoj -r rm /var/www/uoj -r && ln -s /var/svn/uoj/cur/uoj/1 /var/www/uoj while [ ! -d "/var/www/uoj/app" ] do sleep 1 done mv uoj_config.php /var/www/uoj/app/.config.php mysql -u root --password=root uoj_judger/include/uoj_work_path.h make ln -s /var/uoj_data ~/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 EOD mv judge_client_config.json /home/local_main_judger/judge_client/.conf.json chown local_main_judger /home/local_main_judger/judge_client/.conf.json chmod 600 /home/local_main_judger/judge_client/.conf.json echo 'insert into judger_info (judger_name, password) values ("main_judger", "__main_judger_password__")' | mysql app_uoj233 -u root --password=root php /var/www/uoj/app/cli.php upgrade:latest