vcmiinstall.sh 766 B

123456789101112131415161718192021222324252627282930313233
  1. #!/bin/bash
  2. function errorcheck(){
  3. if [$? -gt 0]; then
  4. echo "Error during $1"
  5. quit
  6. else
  7. echo "$1 successful"
  8. fi
  9. }
  10. svn co https://vcmi.svn.sourceforge.net/svnroot/vcmi/branches/programmingChallenge/ vcmi
  11. errorcheck "fetching sources"
  12. cd vcmi
  13. autoreconf -i
  14. errorcheck "autoreconf -i"
  15. cd ..
  16. vcmi/configure --datadir=`pwd` --bindir=`pwd`vcmi --libdir=`pwd`
  17. errorcheck "configure"
  18. make
  19. errorcheck "make"
  20. unzip vcmipack.zip -d vcmi
  21. errorcheck "pack unzip"
  22. ln -s "vcmi/b1.json"
  23. errorckeck "b1.json symlink"
  24. ln -s "AI/StupidAI/.libs/libStupidAI.so"
  25. errorcheck "StupidAI symlink"
  26. ln -s "Odpalarka/odpalarka"
  27. errorcheck "Odpalarka symlink"
  28. ln -s "VCMI_BattleAiHost/vcmirunner"
  29. errorckeck "runner symlink"
  30. ln -s "server/vcmiserver"
  31. errorckeck "server symlink"