fix_cod2.sh 910 B

123456789101112131415161718192021
  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. if ldd "${executabledir}/cod2_lnxded" 2>&1 | grep -q "libstdc++\.so\.5 => not found"; then
  11. # shellcheck disable=SC2034 # Used by fn_fix_msg_start_nl and fn_fix_msg_end.
  12. fixname="libstdc++5 i386"
  13. fn_fix_msg_start_nl
  14. 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"
  15. fn_dl_extract "${tmpdir}" "libstdc++5-i386-3.3.6-34.tar.xz" "${serverfiles}"
  16. fn_clear_tmp
  17. fn_fix_msg_end
  18. fi