update_steamcmd.sh 688 B

123456789101112131415161718192021222324252627
  1. #!/bin/bash
  2. # LinuxGSM update_steamcmd.sh module
  3. # Author: Daniel Gibbs
  4. # Contributors: https://linuxgsm.com/contrib
  5. # Website: https://linuxgsm.com
  6. # Description: Handles updating using SteamCMD.
  7. moduleselfname="$(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. date '+%s' > "${lockdir:?}/update.lock"
  17. fn_update_apply fn_dl_steamcmd
  18. else
  19. fn_update_steamcmd_localbuild
  20. fn_update_steamcmd_remotebuild
  21. fn_update_steamcmd_compare
  22. fi