Skip to content

Instantly share code, notes, and snippets.

@cierzniak
Last active August 1, 2019 16:13
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save cierzniak/2799c07d597d34030c3e368727716110 to your computer and use it in GitHub Desktop.
Save cierzniak/2799c07d597d34030c3e368727716110 to your computer and use it in GitHub Desktop.
Tibia Linux Client installer
#!/usr/bin/env bash
GAME_DOWNLOAD_URL=https://static.tibia.com/download/tibia.x64.tar.gz
MAPS_DOWNLOAD_URL=https://tibiamaps.io/downloads/minimap-with-markers
TEMP_DIR=$(mktemp -d)
APP_DIR=/opt/Tibia
USER_DIR=${HOME}/.local/share/CipSoft\ GmbH/Tibia/packages/Tibia
echo "Install Tibia Linux Client with maps"
if [[ $(id -u) != 0 ]]; then
echo "> Gimme passw0rd to make some nasty things"
sudo -v
fi
echo "> Installing some packages"
sudo apt-get install -yqq libpcre16-3 libssl-dev curl unzip
echo "> Creating temporary directory"
cd ${TEMP_DIR}
echo "> Installing game"
FILE_NAME=tibia.tar.gz
curl -fsSL ${GAME_DOWNLOAD_URL} -o ${FILE_NAME}
tar zxf ${FILE_NAME}
sudo mv Tibia/ ${APP_DIR}/
echo "> Adding entry to apps menu"
cat << EOT | sudo tee /usr/share/applications/tibia.desktop > /dev/null
[Desktop Entry]
Type=Application
Name=Tibia
Comment=Tibia Linux Client
Icon=${APP_DIR}/tibia.ico
Exec=${APP_DIR}/start-tibia-launcher.sh
Categories=Games;
Path=${APP_DIR}/
EOT
echo "> Installing maps (with markers)"
FILE_NAME=tibiamaps.zip
curl -fsSL ${MAPS_DOWNLOAD_URL} -o ${FILE_NAME}
unzip -qqod "${USER_DIR}" ${FILE_NAME}
echo "> Removing temporary directory"
rm -rf ${TEMP_DIR}
echo "OK, great, enjoy"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment