update_steamcmd.sh 919 B

123456789101112131415161718192021222324252627282930313233343536373839
  1. #!/bin/bash
  2. # LinuxGSM update_steamcmd.sh module
  3. # Author: Daniel Gibbs
  4. # Contributors: http://linuxgsm.com/contrib
  5. # Website: https://linuxgsm.com
  6. # Description: Handles updating using SteamCMD.
  7. functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
  8. # init steamcmd functions
  9. core_steamcmd.sh
  10. # The location where the builds are checked and downloaded.
  11. remotelocation="SteamCMD"
  12. check.sh
  13. fn_print_dots "${remotelocation}"
  14. if [ "${forceupdate}" == "1" ]; then
  15. # forceupdate bypasses update checks.
  16. if [ "${status}" != "0" ]; then
  17. fn_print_restart_warning
  18. exitbypass=1
  19. command_stop.sh
  20. fn_firstcommand_reset
  21. fn_dl_steamcmd
  22. date +%s > "${lockdir}/lastupdate.lock"
  23. exitbypass=1
  24. command_start.sh
  25. fn_firstcommand_reset
  26. else
  27. fn_dl_steamcmd
  28. date +%s > "${lockdir}/lastupdate.lock"
  29. fi
  30. else
  31. fn_update_steamcmd_localbuild
  32. fn_update_steamcmd_remotebuild
  33. fn_update_steamcmd_compare
  34. fi