install_dl_ut99.sh 1.0 KB

12345678910111213141516171819202122232425262728293031323334353637
  1. #!/bin/bash
  2. # LGSM install_dl_ut99.sh function
  3. # Author: Daniel Gibbs
  4. # Website: http://gameservermanagers.com
  5. lgsm_version="050216"
  6. echo ""
  7. echo "Downloading Server Files"
  8. echo "================================="
  9. sleep 1
  10. fn_dl "ut-server-436.tar.gz" "${filesdir}" "http://gameservermanagers.com/files/ut99/ut-server-436.tar.gz" "10cd7353aa9d758a075c600a6dd193fd"
  11. if [ ! -f UTPGPatch451.tar.bz2 ]; then
  12. wget http://gameservermanagers.com/files/ut99/UTPGPatch451.tar.bz2
  13. else
  14. echo "UTPGPatch451.tar.bz2 already downloaded!"
  15. fi
  16. echo "Running MD5 checksum to verify the file"
  17. sleep 1
  18. echo "MD5 checksum: 77a735a78b1eb819042338859900b83b"
  19. md5check=$(md5sum UTPGPatch451.tar.bz2|awk '{print $1;}')
  20. echo "File returned: ${md5check}"
  21. if [ "${md5check}" != "77a735a78b1eb819042338859900b83b" ]; then
  22. echo "MD5 checksum: FAILED!"
  23. read -p "Retry download? [y/N]" yn
  24. case $yn in
  25. [Yy]* ) rm -fv UTPGPatch451.tar.bz2; fn_filesdl;;
  26. [Nn]* ) echo Exiting; exit;;
  27. * ) echo "Please answer yes or no.";;
  28. esac
  29. else
  30. echo "MD5 checksum: PASSED"
  31. fi
  32. echo ""