Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/sh
- ####################################################################
- # The shell MUST be run in the UT2004 root
- # file in order to access the /System folder.
- ####################################################################
- dir=""
- dir=$1
- usage(){
- echo "Usage: $0 Path/To/UT2004"
- exit 1
- }
- [[ $# -eq 0 ]] && usage
- cd $dir
- ####################################################################
- # Check the cmd to install in terms of the distro
- ####################################################################
- pkgman=$( command -v yum || command -v apt-get ) || echo "Neither yum nor apt-get found"
- list='libstdc++-devel libstdc++-static compat-libstdc++-33 derelict-openAL'
- for i in $list; do
- sudo $pkgman install $i
- done
- ####################################################################
- # Remove all .exe & .dll files
- ####################################################################
- rm -rf */*.exe */*.dll *.exe *.dll
- ####################################################################
- # cdkey part & ut2004-bin* files to /System
- ####################################################################
- cd System
- # Link the used libraries
- pathtoSDL=$(locate -i --limit=1 /usr/*/libSDL-1.2.so.0)
- pathtoOpenAL=$(locate -i --limit=1 /usr/*/libopenal.so.1)
- ln -s $pathtoSDL libSDL-1.2.so.0
- ln -s $pathtoOpenAL openal.so
- # Create a cdkey with your cdkey
- read -p "Enter your cd key: " cdkeyval
- echo $cdkeyval > cdkey
- # Download & chmod ut2004-bin*
- wget --no-check-certificate https://googledrive.com/host/0B7FxjBftKGMwcDc1U29Qa0I2OGc && mv 0B7FxjBftKGMwcDc1U29Qa0I2OGc ut2004-bin
- wget --no-check-certificate https://googledrive.com/host/0B7FxjBftKGMwUlZmaXg3dDhMSDQ && mv 0B7FxjBftKGMwUlZmaXg3dDhMSDQ ut2004-bin-linux-amd64
- chmod 0500 ut2004-bin*
- # Remove the useless ini files. New ini files will go in /home/.ut2004
- rm -f User.ini UT2004.ini ut2004-win64.ini
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement