Advertisement
Guest User

assaultcube.sh

a guest
Sep 11th, 2011
151
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.52 KB | None | 0 0
  1. #!/bin/sh
  2. # CUBE_DIR should refer to the directory in which Cube is placed.
  3. #CUBE_DIR=~/cube
  4. #CUBE_DIR=/usr/local/cube
  5. #CUBE_DIR=./
  6. CUBE_DIR=$(dirname $(readlink -f "${0}"))
  7.  
  8. # CUBE_OPTIONS contains any command line options you would like to start Cube with.
  9. #CUBE_OPTIONS="-f"
  10. CUBE_OPTIONS="--home=${HOME}/.assaultcube_v1.1 --init"
  11.  
  12. # SYSTEM_NAME should be set to the name of your operating system.
  13. #SYSTEM_NAME=Linux
  14. SYSTEM_NAME=`uname -s`
  15.  
  16. # MACHINE_NAME should be set to the name of your processor.
  17. #MACHINE_NAME=i686
  18. MACHINE_NAME=`uname -m`
  19.  
  20. case ${SYSTEM_NAME} in
  21. Linux)
  22. SYSTEM_NAME=linux_
  23. ;;
  24. *)
  25. SYSTEM_NAME=unknown_
  26. ;;
  27. esac
  28.  
  29. case ${MACHINE_NAME} in
  30. i486|i586|i686)
  31. MACHINE_NAME=
  32. ;;
  33. x86_64)
  34. MACHINE_NAME=64_
  35. ;;
  36. *)
  37. if [ ${SYSTEM_NAME} != native_ ]
  38. then
  39. SYSTEM_NAME=native_
  40. fi
  41. MACHINE_NAME=
  42. ;;
  43. esac
  44.  
  45. if [ -x ${CUBE_DIR}/bin_unix/native_client ]
  46. then
  47. SYSTEM_NAME=native_
  48. MACHINE_NAME=
  49. fi
  50.  
  51. if [ -x ${CUBE_DIR}/bin_unix/${SYSTEM_NAME}${MACHINE_NAME}client ]
  52. then
  53. cd ${CUBE_DIR}
  54. exec ${CUBE_DIR}/bin_unix/${SYSTEM_NAME}${MACHINE_NAME}client ${CUBE_OPTIONS} "$@"
  55. else
  56. echo "Your platform does not have a pre-compiled Cube client."
  57. echo "Please follow the following steps to build a native client:"
  58. echo "1) Ensure you have the SDL, SDL-image, OpenAL, and OpenGL libraries installed."
  59. echo "2) Change directory to source/src/ and type \"make install\"."
  60. echo "3) If the build succeeds, return to this directory and run this script again."
  61. exit 1
  62. fi
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement