Advertisement
lucasgautheron

Untitled

May 31st, 2011
121
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.09 KB | None | 0 0
  1. cd /home/trunk/
  2. TSH=$(date +%H:%M:%S\ %d.%m.%y)
  3. if test `find "./ac/svnserv.log" -mmin +1`
  4. then
  5. ACpsi=`ps aux | grep "servercmdlinesvn" | grep -v grep | awk '{print $2,$3,$4,$8,$11}'`
  6. ACpid=`echo "$ACpsi"|awk '{print $1}'`
  7. ACstat=`echo "$ACpsi"|awk '{print $4}'`
  8. kill $ACpid
  9. svn up /home/trunk/
  10. SVNREV=`svn up /home/trunk/ | grep "At revision" | grep -v grep | awk '{print $2,$3}'`
  11. REV=`echo "$SVNREV"|awk '{print $2}'`
  12. echo $REV
  13. echo " -n\f3SVN\f4 - woop.us \f7rev\f3 $REV" > ./ac/config/revision.txt
  14. cd /home/trunk/ac/bin_unix/
  15. rm native_server
  16. rm native_client
  17. cd /home/trunk/ac/source/src
  18. make clean
  19. make
  20. make install
  21. cd /home/trunk/ac/bin_unix/
  22. COMPILATIONSTATE='x'
  23. if [ -e "native_server" ] && [ -e "native_client" ]
  24. then
  25. COMPILATIONSTATE='succeeded'
  26. else
  27. COMPILATIONSTATE='failed'
  28. fi
  29. echo "[$TSH] Killed $ACpid. Updated to rev $REV. Compilation $COMPILATIONSTATE" >> /var/www/logs/svn/update.log
  30. cd /home/trunk/ac/
  31. sh server_svn.sh &
  32. else
  33. echo "[$TSH] skipped svn (server was active during the last minute)" >> /var/www/logs/svn/update.log
  34. fi
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement