Skip to content

Instantly share code, notes, and snippets.

@morsik
Last active December 16, 2015 11:39
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 morsik/5429255 to your computer and use it in GitHub Desktop.
Save morsik/5429255 to your computer and use it in GitHub Desktop.
#!/bin/bash
#
# Enemy Territory: Legacy installation script
#
URL_ETL="http://mirror.etlegacy.com/etlegacy-linux-2.71rc1.tar.gz"
URL_ETWOLF="http://ftp.gwdg.de/pub/misc/ftp.idsoftware.com/idstuff/et/linux/et-linux-2.60.x86.run"
F_ETWOLF="et-linux-2.60.x86.run"
function i {
echo -en "\033[1;32m * \033[1;37m${1}\033[0m"
}
i "Downloading latest Enemy Territory: Legacy...\n"
wget ${URL_ETL} -O etlegacy-latest.tar.gz
i "Downloading game data..."
wget ${URL_ETWOLF} -O ${F_ETWOLF}
i "Extracting Enemy Territory: Legacy...\n"
tar zxvf etlegacy-latest.tar.gz
ETL_PATH=$(tar tf etlegacy-latest.tar.gz | head -n1)
i "Extracting game data...\n"
chmod +x ${F_ETWOLF}
_OLDPATH=$(pwd)
cd ${ETL_PATH}
../${F_ETWOLF} --tar xvf etmain/mp_bin.pk3 etmain/pak0.pk3 etmain/pak1.pk3 etmain/pak2.pk3
cd ${_OLDPATH}
i "Do you want to cleaup downloaded files? [y/n] "
read Q
if [ "${Q}" == "y" ]; then
i "Cleaning...\n"
rm -rf ${F_ETWOLF} etlegacy-latest.tar.gz
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment