update_steamcmd.sh 877 B

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