Counter Strike : Global Offensive Source Code
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

49 lines
804 B

  1. #!/bin/bash
  2. OS=`uname`
  3. SCRIPTPATH=`dirname $0`
  4. FORCEARG=""
  5. case $OS in
  6. "Darwin")
  7. BINNAME=vpc_osx
  8. ;;
  9. "Linux")
  10. BINNAME=vpc_linux
  11. ;;
  12. *)
  13. echo "Couldn't find appropriate VPC binary, fix the script."
  14. exit -1
  15. ;;
  16. esac
  17. CWD=`pwd`
  18. cd $SCRIPTPATH/../../utils/vpc/vpc
  19. # ask make if we need to do any work, returns 0 if we don't,
  20. # non zero if we do.
  21. make -q
  22. RC=$?
  23. if [ $RC -eq 1 ]; then
  24. FORCEARG="/f"
  25. elif [ $RC -eq 2 ]; then
  26. FORCEARG="/f"
  27. make clean
  28. fi
  29. make -j4
  30. if [ $? -ne 0 ]; then
  31. exit -1
  32. fi
  33. if [ $RC -ne 0 ]; then
  34. cp -vf ../../devtools/bin/$BINNAME $CWD/$SCRIPTPATH
  35. fi
  36. cd $CWD
  37. if [ $OS == "Darwin" ]; then
  38. $SCRIPTPATH/$BINNAME $FORCEARG $@
  39. elif [ $OS == "Linux" ]; then
  40. $SCRIPTPATH/$BINNAME $FORCEARG $@
  41. else
  42. echo "Couldn't find appropriate VPC binary, fix the script."
  43. exit -1
  44. fi