fix_cod2.sh 994 B

12345678910111213141516171819202122
  1. #!/bin/bash
  2. # LinuxGSM fix_cod2.sh module
  3. # Author: Daniel Gibbs
  4. # Contributors: https://linuxgsm.com/contrib
  5. # Website: https://linuxgsm.com
  6. # Description: Resolves issues with Call of Duty 2.
  7. # shellcheck disable=SC2034 # Used by the module loader.
  8. moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
  9. export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:${serverfiles}"
  10. export GLIBC_TUNABLES="${GLIBC_TUNABLES:+${GLIBC_TUNABLES}:}glibc.rtld.execstack=2"
  11. if ldd "${executabledir}/cod2_lnxded" 2>&1 | grep -q "libstdc++\.so\.5 => not found"; then
  12. # shellcheck disable=SC2034 # Used by fn_fix_msg_start_nl and fn_fix_msg_end.
  13. fixname="libstdc++5 i386"
  14. fn_fix_msg_start_nl
  15. fn_fetch_file "https://linuxgsm.download/libraries/libstdc++5-i386-3.3.6-34.tar.xz" "" "" "" "${tmpdir}" "libstdc++5-i386-3.3.6-34.tar.xz" "nochmodx" "norun" "noforce" "288a4cc9d6b7647f28c702028437e0f3"
  16. fn_dl_extract "${tmpdir}" "libstdc++5-i386-3.3.6-34.tar.xz" "${serverfiles}"
  17. fn_clear_tmp
  18. fn_fix_msg_end
  19. fi