update_steamcmd.sh 812 B

1234567891011121314151617181920212223242526272829303132
  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. if [ "${firstcommandname}" == "INSTALL" ]; then
  17. fn_dl_steamcmd
  18. date +%s > "${lockdir:?}/last-updated.lock"
  19. else
  20. date '+%s' > "${lockdir:?}/update.lock"
  21. fn_update_apply fn_dl_steamcmd
  22. fi
  23. else
  24. fn_update_steamcmd_localbuild
  25. fn_update_steamcmd_remotebuild
  26. fn_update_steamcmd_compare
  27. fi