fix_glibc.sh 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. #!/bin/bash
  2. # LGSM fix_glibc.sh function
  3. # Author: Daniel Gibbs
  4. # Website: http://gameservermanagers.com
  5. lgsm_version="020116"
  6. info_glibc.sh
  7. # Blade Symphony
  8. if [ "${gamename}" == "Blade Symphony" ]; then
  9. :
  10. # Dont Starve Together
  11. elif [ "${gamename}" == "Don't Starve Together" ]; then
  12. :
  13. # Double Action: Boogaloo
  14. elif [ "${gamename}" == "Double Action: Boogaloo" ]; then
  15. fn_fetch_file_github "lgsm/lib/ubuntu12.04/i386" "libm.so.6" "${lgsmdir}/lib" "noexecutecmd" "norun" "noforce" "nomd5"
  16. # Fistful of Frags
  17. elif [ "${gamename}" == "Fistful of Frags" ]; then
  18. :
  19. # Garry's Mod
  20. elif [ "${gamename}" == "Garry's Mod" ]; then
  21. :
  22. # Insurgency
  23. elif [ "${gamename}" == "Insurgency" ]; then
  24. :
  25. elif [ "${gamename}" == "Left 4 Dead" ]; then
  26. :
  27. # Natural Selection 2
  28. elif [ "${gamename}" == "Natural Selection 2" ]; then
  29. :
  30. # NS2: Combat
  31. elif [ "${gamename}" == "NS2: Combat" ]; then
  32. :
  33. # No More Room in Hell
  34. elif [ "${gamename}" == "No More Room in Hell" ]; then
  35. :
  36. # ARMA 3
  37. elif [ "${gamename}" == "ARMA 3" ]; then
  38. :
  39. # Just Cause 2
  40. elif [ "${gamename}" == "Just Cause 2" ]; then
  41. :
  42. # Serious Sam 3: BFE
  43. elif [ "${gamename}" == "Serious Sam 3: BFE" ]; then
  44. :
  45. fi
  46. if [ "$(printf '%s\n$glibc_required\n' $glibc_version | sort -V | head -n 1)" != "${glibc_required}" ]; then
  47. echo "Version $(ldd --version | sed -n '1s/.* //p') is lower than $glibc_required"
  48. if [ "${glibcfix}" == "yes" ]; then
  49. echo "applied glibc fix"
  50. echo "export LD_LIBRARY_PATH=:"${libdir}"
  51. export LD_LIBRARY_PATH=:"${lgsmdir}/lib/ubuntu12.04/i386"
  52. else
  53. echo "no glibc fix available you need to upgrade bro!!"
  54. fi
  55. else
  56. echo "GLIBC is OK no fix required"
  57. fi