#!/bin/bash
cd /home/judge/git
git pull .

echo "SVN not available from github any more "
echo "using 'sudo bash fixing.sh' to get update from dl.hustoj.com "
exit 1

cd /home/judge/src/core
pkill -9 judged
bash make.sh
cd ../install
chmod +x g++.sh gcc.sh makeout.sh
mysql jol< update.sql
judged

web_user=`grep www /etc/passwd|awk -F: '{print $1}'`
mkdir /var/log/hustoj/
chown -R $web_user /var/log/hustoj

chmod 770 /home/judge/src/web/upload
chown $web_user -R /home/judge/src/web/upload

