Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- cd /home/trunk/
- TSH=$(date +%H:%M:%S\ %d.%m.%y)
- if test `find "./ac/svnserv.log" -mmin +1`
- then
- ACpsi=`ps aux | grep "servercmdlinesvn" | grep -v grep | awk '{print $2,$3,$4,$8,$11}'`
- ACpid=`echo "$ACpsi"|awk '{print $1}'`
- ACstat=`echo "$ACpsi"|awk '{print $4}'`
- kill $ACpid
- svn up /home/trunk/
- SVNREV=`svn up /home/trunk/ | grep "At revision" | grep -v grep | awk '{print $2,$3}'`
- REV=`echo "$SVNREV"|awk '{print $2}'`
- echo $REV
- echo " -n\f3SVN\f4 - woop.us \f7rev\f3 $REV" > ./ac/config/revision.txt
- cd /home/trunk/ac/bin_unix/
- rm native_server
- rm native_client
- cd /home/trunk/ac/source/src
- make clean
- make
- make install
- cd /home/trunk/ac/bin_unix/
- COMPILATIONSTATE='x'
- if [ -e "native_server" ] && [ -e "native_client" ]
- then
- COMPILATIONSTATE='succeeded'
- else
- COMPILATIONSTATE='failed'
- fi
- echo "[$TSH] Killed $ACpid. Updated to rev $REV. Compilation $COMPILATIONSTATE" >> /var/www/logs/svn/update.log
- cd /home/trunk/ac/
- sh server_svn.sh &
- else
- echo "[$TSH] skipped svn (server was active during the last minute)" >> /var/www/logs/svn/update.log
- fi
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement