Last active
December 16, 2015 11:39
-
-
Save morsik/5429255 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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