Advertisement
Acquiesce

UT2004SetUpLinux

Apr 6th, 2014
158
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 1.90 KB | None | 0 0
  1. #!/bin/sh
  2. ####################################################################
  3. #       The shell MUST be run in the UT2004 root
  4. #       file in order to access the /System folder.
  5. ####################################################################
  6. dir=""
  7. dir=$1
  8.  
  9. usage(){
  10.     echo "Usage: $0 Path/To/UT2004"
  11.     exit 1
  12. }
  13. [[ $# -eq 0 ]] && usage
  14.  
  15. cd $dir
  16.  
  17. ####################################################################
  18. #       Check the cmd to install in terms of the distro
  19. ####################################################################
  20. pkgman=$( command -v yum || command -v apt-get ) || echo "Neither yum nor apt-get found"
  21.  
  22. list='libstdc++-devel libstdc++-static compat-libstdc++-33 derelict-openAL'
  23. for i in $list; do
  24.    sudo $pkgman install $i
  25. done
  26.  
  27. ####################################################################
  28. #       Remove all .exe & .dll files
  29. ####################################################################
  30. rm -rf */*.exe */*.dll *.exe *.dll
  31.  
  32. ####################################################################
  33. #       cdkey part & ut2004-bin* files to /System
  34. ####################################################################
  35. cd System
  36. # Link the used libraries
  37. pathtoSDL=$(locate -i --limit=1 /usr/*/libSDL-1.2.so.0)
  38. pathtoOpenAL=$(locate -i --limit=1 /usr/*/libopenal.so.1)
  39. ln -s $pathtoSDL libSDL-1.2.so.0
  40. ln -s $pathtoOpenAL openal.so
  41.  
  42. # Create a cdkey with your cdkey
  43. read -p "Enter your cd key: " cdkeyval
  44. echo $cdkeyval > cdkey
  45.  
  46. # Download & chmod ut2004-bin*
  47. wget --no-check-certificate https://googledrive.com/host/0B7FxjBftKGMwcDc1U29Qa0I2OGc && mv 0B7FxjBftKGMwcDc1U29Qa0I2OGc ut2004-bin
  48. wget --no-check-certificate https://googledrive.com/host/0B7FxjBftKGMwUlZmaXg3dDhMSDQ && mv 0B7FxjBftKGMwUlZmaXg3dDhMSDQ ut2004-bin-linux-amd64
  49. chmod 0500 ut2004-bin*
  50.  
  51. # Remove the useless ini files. New ini files will go in /home/.ut2004
  52. rm -f User.ini UT2004.ini ut2004-win64.ini
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement