core_steamcmd.sh 20 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427
  1. #!/bin/bash
  2. # LinuxGSM core_steamcmd.sh module
  3. # Author: Daniel Gibbs
  4. # Contributors: http://linuxgsm.com/contrib
  5. # Website: https://linuxgsm.com
  6. # Description: Core modules for SteamCMD
  7. moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
  8. fn_install_steamcmd() {
  9. if [ "${shortname}" == "ark" ] && [ "${installsteamcmd}" == "1" ]; then
  10. steamcmddir="${serverfiles}/Engine/Binaries/ThirdParty/SteamCMD/Linux"
  11. fi
  12. if [ ! -d "${steamcmddir}" ]; then
  13. mkdir -p "${steamcmddir}"
  14. fi
  15. fn_fetch_file "http://media.steampowered.com/client/steamcmd_linux.tar.gz" "" "" "" "${tmpdir}" "steamcmd_linux.tar.gz" "nochmodx" "norun" "noforce" "nohash"
  16. fn_dl_extract "${tmpdir}" "steamcmd_linux.tar.gz" "${steamcmddir}"
  17. chmod +x "${steamcmddir}/steamcmd.sh"
  18. }
  19. fn_check_steamcmd_user() {
  20. # Checks if steamuser is setup.
  21. if [ "${steamuser}" == "username" ]; then
  22. fn_print_fail_nl "Steam login not set. Update steamuser in ${configdirserver}"
  23. echo -e " * Change steamuser=\"username\" to a valid steam login."
  24. if [ -d "${lgsmlogdir}" ]; then
  25. fn_script_log_fail "Steam login not set. Update steamuser in ${configdirserver}"
  26. fi
  27. core_exit.sh
  28. fi
  29. # Anonymous user is set if steamuser is missing.
  30. if [ -z "${steamuser}" ]; then
  31. if [ -d "${lgsmlogdir}" ]; then
  32. fn_script_log_info "Using anonymous Steam login"
  33. fi
  34. steamuser="anonymous"
  35. steampass=''
  36. fi
  37. }
  38. fn_check_steamcmd() {
  39. # Checks if SteamCMD exists when starting or updating a server.
  40. # Only install if steamcmd package is missing or steamcmd dir is missing.
  41. if [ ! -f "${steamcmddir}/steamcmd.sh" ] && [ -z "$(command -v steamcmd 2> /dev/null)" ]; then
  42. if [ "${commandname}" == "INSTALL" ]; then
  43. echo -e "install SteamCMD"
  44. fn_install_steamcmd
  45. else
  46. fn_print_warn_nl "SteamCMD is not installed"
  47. fn_script_log_warn "SteamCMD is not installed"
  48. fn_install_steamcmd
  49. fi
  50. elif [ "${commandname}" == "INSTALL" ]; then
  51. echo -en "install SteamCMD"
  52. fn_print_skip_eol_nl
  53. fi
  54. }
  55. fn_check_steamcmd_dir() {
  56. # Worksround that pre-installs the correct steam directories to ensure all packages use the correct Standard.
  57. # https://github.com/ValveSoftware/steam-for-linux/issues/6976#issuecomment-610446347
  58. # Create Steam installation directory.
  59. if [ ! -d "${XDG_DATA_HOME:="${HOME}/.local/share"}/Steam" ]; then
  60. mkdir -p "${XDG_DATA_HOME:="${HOME}/.local/share"}/Steam"
  61. fi
  62. # Create common Steam directory.
  63. if [ ! -d "${HOME}/.steam" ]; then
  64. mkdir -p "${HOME}/.steam"
  65. fi
  66. # Symbolic links to Steam installation directory.
  67. if [ ! -L "${HOME}/.steam/root" ]; then
  68. if [ -d "${HOME}/.steam/root" ]; then
  69. rm -f "${HOME:?}/.steam/root"
  70. fi
  71. ln -s "${XDG_DATA_HOME:="${HOME}/.local/share"}/Steam" "${HOME}/.steam/root"
  72. fi
  73. if [ ! -L "${HOME}/.steam/steam" ]; then
  74. if [ -d "${HOME}/.steam/steam" ]; then
  75. rm -rf "${HOME}/.steam/steam"
  76. fi
  77. ln -s "${XDG_DATA_HOME:="${HOME}/.local/share"}/Steam" "${HOME}/.steam/steam"
  78. fi
  79. }
  80. fn_check_steamcmd_dir_legacy() {
  81. # Remove old Steam installation directories ~/Steam and ${rootdir}/steamcmd
  82. if [ -d "${rootdir}/steamcmd" ] && [ "${steamcmddir}" == "${XDG_DATA_HOME:="${HOME}/.local/share"}/Steam" ]; then
  83. rm -rf "${rootdir:?}/steamcmd"
  84. fi
  85. if [ -d "${HOME}/Steam" ] && [ "${steamcmddir}" == "${XDG_DATA_HOME:="${HOME}/.local/share"}/Steam" ]; then
  86. rm -rf "${HOME}/Steam"
  87. fi
  88. }
  89. fn_check_steamcmd_steamapp() {
  90. # Check that steamapp directory fixes issue #3481
  91. if [ ! -d "${serverfiles}/steamapps" ]; then
  92. mkdir -p "${serverfiles}/steamapps"
  93. fi
  94. }
  95. fn_check_steamcmd_ark() {
  96. # Checks if SteamCMD exists in
  97. # Engine/Binaries/ThirdParty/SteamCMD/Linux
  98. # to allow ark mods to work
  99. if [ ! -f "${serverfiles}/Engine/Binaries/ThirdParty/SteamCMD/Linux/steamcmd.sh" ]; then
  100. installsteamcmd=1
  101. if [ "${commandname}" == "INSTALL" ]; then
  102. fn_install_steamcmd
  103. else
  104. fn_print_warn_nl "ARK mods SteamCMD is missing"
  105. fn_script_log_warn "ARK mods SteamCMD is missing"
  106. fn_install_steamcmd
  107. fi
  108. elif [ "${commandname}" == "INSTALL" ]; then
  109. fn_print_information "ARK mods SteamCMD is already installed..."
  110. fn_print_ok_eol_nl
  111. fi
  112. }
  113. fn_check_steamcmd_clear() {
  114. # Will remove steamcmd dir if steamcmd package is installed.
  115. if [ "$(command -v steamcmd 2> /dev/null)" ] && [ -d "${rootdir}/steamcmd" ]; then
  116. rm -rf "${steamcmddir:?}"
  117. exitcode=$?
  118. if [ "${exitcode}" != 0 ]; then
  119. fn_script_log_fail "Removing ${rootdir}/steamcmd"
  120. else
  121. fn_script_log_pass "Removing ${rootdir}/steamcmd"
  122. fi
  123. fi
  124. }
  125. fn_check_steamcmd_exec() {
  126. if [ "$(command -v steamcmd 2> /dev/null)" ]; then
  127. steamcmdcommand="steamcmd"
  128. else
  129. steamcmdcommand="./steamcmd.sh"
  130. fi
  131. }
  132. fn_update_steamcmd_localbuild() {
  133. # Gets local build info.
  134. fn_print_dots "Checking local build: ${remotelocation}"
  135. fn_check_steamcmd_appmanifest
  136. # Uses appmanifest to find local build.
  137. localbuild=$(grep buildid "${appmanifestfile}" | tr '[:blank:]"' ' ' | tr -s ' ' | cut -d\ -f3)
  138. # Checks if localbuild variable has been set.
  139. if [ -z "${localbuild}" ]; then
  140. fn_print_fail "Checking local build: ${remotelocation}: missing local build info"
  141. fn_script_log_fail "Missing local build info"
  142. core_exit.sh
  143. else
  144. fn_print_ok "Checking local build: ${remotelocation}"
  145. fn_script_log_pass "Checking local build"
  146. fi
  147. }
  148. fn_update_steamcmd_remotebuild() {
  149. # Get remote build info.
  150. if [ -d "${steamcmddir}" ]; then
  151. cd "${steamcmddir}" || exit
  152. fi
  153. # Removes appinfo.vdf as a fix for not always getting up to date version info from SteamCMD.
  154. if [ "$(find "${HOME}" -type f -name "appinfo.vdf" 2> /dev/null | wc -l)" -ne "0" ]; then
  155. find "${HOME}" -type f -name "appinfo.vdf" -exec rm -f {} \; 2> /dev/null
  156. fi
  157. # Set branch to public if no custom branch.
  158. if [ -z "${branch}" ]; then
  159. branch="public"
  160. fi
  161. # added as was failing GitHub Actions test. Running SteamCMD twice seems to fix it.
  162. ${steamcmdcommand} +login "${steamuser}" "${steampass}" +app_info_update 1 +quit > /dev/null 2>&1
  163. # password for branch not needed to check the buildid
  164. remotebuildversion=$(${steamcmdcommand} +login "${steamuser}" "${steampass}" +app_info_update 1 +app_info_print "${appid}" +quit | sed -e '/"branches"/,/^}/!d' | sed -n "/\"${branch}\"/,/}/p" | grep -m 1 buildid | tr -cd '[:digit:]')
  165. if [ "${firstcommandname}" != "INSTALL" ]; then
  166. fn_print_dots "Checking remote build: ${remotelocation}"
  167. # Checks if remotebuildversion variable has been set.
  168. if [ -z "${remotebuildversion}" ] || [ "${remotebuildversion}" == "null" ]; then
  169. fn_print_fail "Checking remote build: ${remotelocation}"
  170. fn_script_log_fail "Checking remote build"
  171. core_exit.sh
  172. else
  173. fn_print_ok "Checking remote build: ${remotelocation}"
  174. fn_script_log_pass "Checking remote build"
  175. fi
  176. else
  177. # Checks if remotebuild variable has been set.
  178. if [ -z "${remotebuildversion}" ] || [ "${remotebuildversion}" == "null" ]; then
  179. fn_print_failure "Unable to get remote build"
  180. fn_script_log_fail "Unable to get remote build"
  181. core_exit.sh
  182. fi
  183. fi
  184. }
  185. fn_update_steamcmd_compare() {
  186. fn_print_dots "Checking for update: ${remotelocation}"
  187. # Update has been found or force update.
  188. if [ "${localbuild}" != "${remotebuildversion}" ] || [ "${forceupdate}" == "1" ]; then
  189. # Create update lockfile.
  190. date '+%s' > "${lockdir:?}/update.lock"
  191. fn_print_ok_nl "Checking for update: ${remotelocation}"
  192. echo -en "\n"
  193. echo -e "Update available"
  194. echo -e "* Local build: ${red}${localbuild}${default}"
  195. echo -e "* Remote build: ${green}${remotebuildversion}${default}"
  196. if [ -n "${branch}" ]; then
  197. echo -e "* Branch: ${branch}"
  198. fi
  199. if [ -n "${betapassword}" ]; then
  200. echo -e "* Branch password: ${betapassword}"
  201. fi
  202. echo -e "https://steamdb.info/app/${appid}/"
  203. echo -en "\n"
  204. fn_script_log_info "Update available"
  205. fn_script_log_info "Local build: ${localbuild}"
  206. fn_script_log_info "Remote build: ${remotebuildversion}"
  207. if [ -n "${branch}" ]; then
  208. fn_script_log_info "Branch: ${branch}"
  209. fi
  210. if [ -n "${betapassword}" ]; then
  211. fn_script_log_info "Branch password: ${betapassword}"
  212. fi
  213. fn_script_log_info "${localbuild} > ${remotebuildversion}"
  214. if [ "${commandname}" == "UPDATE" ]; then
  215. unset updateonstart
  216. check_status.sh
  217. # If server stopped.
  218. if [ "${status}" == "0" ]; then
  219. fn_dl_steamcmd
  220. # If server started.
  221. else
  222. fn_print_restart_warning
  223. exitbypass=1
  224. command_stop.sh
  225. fn_firstcommand_reset
  226. exitbypass=1
  227. fn_dl_steamcmd
  228. exitbypass=1
  229. command_start.sh
  230. fn_firstcommand_reset
  231. fi
  232. unset exitbypass
  233. date +%s > "${lockdir:?}/last-updated.lock"
  234. alert="update"
  235. elif [ "${commandname}" == "CHECK-UPDATE" ]; then
  236. alert="check-update"
  237. fi
  238. alert.sh
  239. else
  240. fn_print_ok_nl "Checking for update: ${remotelocation}"
  241. echo -en "\n"
  242. echo -e "No update available"
  243. echo -e "* Local build: ${green}${localbuild}${default}"
  244. echo -e "* Remote build: ${green}${remotebuildversion}${default}"
  245. if [ -n "${branch}" ]; then
  246. echo -e "* Branch: ${branch}"
  247. fi
  248. if [ -n "${betapassword}" ]; then
  249. echo -e "* Branch password: ${betapassword}"
  250. fi
  251. echo -e "https://steamdb.info/app/${appid}/"
  252. echo -en "\n"
  253. fn_script_log_info "No update available"
  254. fn_script_log_info "Local build: ${localbuild}"
  255. fn_script_log_info "Remote build: ${remotebuildversion}"
  256. if [ -n "${branch}" ]; then
  257. fn_script_log_info "Branch: ${branch}"
  258. fi
  259. if [ -n "${betapassword}" ]; then
  260. fn_script_log_info "Branch password: ${betapassword}"
  261. fi
  262. fi
  263. }
  264. fn_appmanifest_info() {
  265. appmanifestfile=$(find -L "${serverfiles}/steamapps" -type f -name "appmanifest_${appid}.acf")
  266. appmanifestfilewc=$(find -L "${serverfiles}/steamapps" -type f -name "appmanifest_${appid}.acf" | wc -l)
  267. }
  268. fn_check_steamcmd_appmanifest() {
  269. fn_appmanifest_info
  270. # Multiple or no matching appmanifest files may sometimes be present.
  271. if [ "${appmanifestfilewc}" -ge "2" ]; then
  272. fn_print_error "Multiple appmanifest_${appid}.acf files found"
  273. fn_script_log_error "Multiple appmanifest_${appid}.acf files found"
  274. fn_print_dots "Removing x${appmanifestfilewc} appmanifest_${appid}.acf files"
  275. for appfile in ${appmanifestfile}; do
  276. rm -f "${appfile:?}"
  277. done
  278. appmanifestfilewc1="${appmanifestfilewc}"
  279. fn_appmanifest_info
  280. # if error can not be resolved.
  281. if [ "${appmanifestfilewc}" -ge "2" ]; then
  282. fn_print_fail "Unable to remove x${appmanifestfilewc} appmanifest_${appid}.acf files"
  283. fn_script_log_fail "Unable to remove x${appmanifestfilewc} appmanifest_${appid}.acf files"
  284. echo -e "* Check user permissions"
  285. for appfile in ${appmanifestfile}; do
  286. echo -e " ${appfile}"
  287. done
  288. core_exit.sh
  289. else
  290. fn_print_ok "Removed x${appmanifestfilewc1} appmanifest_${appid}.acf files"
  291. fn_script_log_pass "Removed x${appmanifestfilewc1} appmanifest_${appid}.acf files"
  292. fn_print_info_nl "Forcing update to correct issue"
  293. fn_script_log_info "Forcing update to correct issue"
  294. fn_dl_steamcmd
  295. fi
  296. elif [ "${appmanifestfilewc}" -eq "0" ]; then
  297. fn_print_error_nl "No appmanifest_${appid}.acf found"
  298. fn_script_log_error "No appmanifest_${appid}.acf found"
  299. fn_print_info_nl "Forcing update to correct issue"
  300. fn_script_log_info "Forcing update to correct issue"
  301. fn_dl_steamcmd
  302. fn_appmanifest_info
  303. if [ "${appmanifestfilewc}" -eq "0" ]; then
  304. fn_print_fail_nl "Still no appmanifest_${appid}.acf found"
  305. fn_script_log_fail "Still no appmanifest_${appid}.acf found"
  306. core_exit.sh
  307. fi
  308. fi
  309. # Checking for half completed updates.
  310. bytesdownloaded=$(grep BytesDownloaded "${appmanifestfile}" | tr -cd '[:digit:]')
  311. bytestodownload=$(grep BytesToDownload "${appmanifestfile}" | tr -cd '[:digit:]')
  312. if [ "${bytesdownloaded}" != "${bytestodownload}" ]; then
  313. fn_print_error_nl "BytesDownloaded and BytesToDownload do not match"
  314. fn_script_log_error "BytesDownloaded and BytesToDownload do not match"
  315. fn_print_info_nl "Forcing update to correct issue"
  316. fn_script_log_info "Forcing update to correct issue"
  317. fn_dl_steamcmd
  318. fi
  319. bytesstaged=$(grep BytesStaged "${appmanifestfile}" | tr -cd '[:digit:]')
  320. bytestostage=$(grep BytesToStage "${appmanifestfile}" | tr -cd '[:digit:]')
  321. if [ "${bytesstaged}" != "${bytestostage}" ]; then
  322. fn_print_error_nl "BytesStaged and BytesToStage do not match"
  323. fn_script_log_error "BytesStaged and BytesToStage do not match"
  324. fn_print_info_nl "Forcing update to correct issue"
  325. fn_script_log_info "Forcing update to correct issue"
  326. fn_dl_steamcmd
  327. fi
  328. # if engine is GoldSrc check SharedDepots exists in appmanifest_90.acf
  329. if [ "${engine}" == "goldsrc" ]; then
  330. shareddepotsexists=$(grep -c SharedDepots "${serverfiles}/steamapps/appmanifest_90.acf")
  331. if [ ! -f "${serverfiles}/steamapps/appmanifest_90.acf" ] || [ "${shareddepotsexists}" == "0" ]; then
  332. fn_print_error_nl "SharedDepots missing from appmanifest_90.acf"
  333. fn_script_log_error "SharedDepots missing from appmanifest_90.acf"
  334. fn_print_info_nl "Forcing update to correct issue"
  335. fn_script_log_info "Forcing update to correct issue"
  336. if [ "${shortname}" == "ahl" ]; then
  337. fn_fetch_file_github "lgsm/data/appmanifest/${shortname}" "appmanifest_90.acf" "${serverfiles}/steamapps" "nochmodx" "norun" "noforce" "nohash"
  338. fn_fetch_file_github "lgsm/data/appmanifest/${shortname}" "appmanifest_10.acf" "${serverfiles}/steamapps" "nochmodx" "norun" "noforce" "nohash"
  339. fn_fetch_file_github "lgsm/data/appmanifest/${shortname}" "appmanifest_70.acf" "${serverfiles}/steamapps" "nochmodx" "norun" "noforce" "nohash"
  340. elif [ "${shortname}" == "bb" ]; then
  341. fn_fetch_file_github "lgsm/data/appmanifest/${shortname}" "appmanifest_90.acf" "${serverfiles}/steamapps" "nochmodx" "norun" "noforce" "nohash"
  342. fn_fetch_file_github "lgsm/data/appmanifest/${shortname}" "appmanifest_10.acf" "${serverfiles}/steamapps" "nochmodx" "norun" "noforce" "nohash"
  343. fn_fetch_file_github "lgsm/data/appmanifest/${shortname}" "appmanifest_70.acf" "${serverfiles}/steamapps" "nochmodx" "norun" "noforce" "nohash"
  344. elif [ "${shortname}" == "cscz" ]; then
  345. fn_fetch_file_github "lgsm/data/appmanifest/${shortname}" "appmanifest_90.acf" "${serverfiles}/steamapps" "nochmodx" "norun" "noforce" "nohash"
  346. fn_fetch_file_github "lgsm/data/appmanifest/${shortname}" "appmanifest_10.acf" "${serverfiles}/steamapps" "nochmodx" "norun" "noforce" "nohash"
  347. fn_fetch_file_github "lgsm/data/appmanifest/${shortname}" "appmanifest_70.acf" "${serverfiles}/steamapps" "nochmodx" "norun" "noforce" "nohash"
  348. fn_fetch_file_github "lgsm/data/appmanifest/${shortname}" "appmanifest_80.acf" "${serverfiles}/steamapps" "nochmodx" "norun" "noforce" "nohash"
  349. elif [ "${shortname}" == "css" ]; then
  350. fn_fetch_file_github "lgsm/data/appmanifest/${shortname}" "appmanifest_90.acf" "${serverfiles}/steamapps" "nochmodx" "norun" "noforce" "nohash"
  351. fn_fetch_file_github "lgsm/data/appmanifest/${shortname}" "appmanifest_10.acf" "${serverfiles}/steamapps" "nochmodx" "norun" "noforce" "nohash"
  352. fn_fetch_file_github "lgsm/data/appmanifest/${shortname}" "appmanifest_70.acf" "${serverfiles}/steamapps" "nochmodx" "norun" "noforce" "nohash"
  353. elif [ "${shortname}" == "dmc" ]; then
  354. fn_fetch_file_github "lgsm/data/appmanifest/${shortname}" "appmanifest_90.acf" "${serverfiles}/steamapps" "nochmodx" "norun" "noforce" "nohash"
  355. fn_fetch_file_github "lgsm/data/appmanifest/${shortname}" "appmanifest_10.acf" "${serverfiles}/steamapps" "nochmodx" "norun" "noforce" "nohash"
  356. fn_fetch_file_github "lgsm/data/appmanifest/${shortname}" "appmanifest_40.acf" "${serverfiles}/steamapps" "nochmodx" "norun" "noforce" "nohash"
  357. fn_fetch_file_github "lgsm/data/appmanifest/${shortname}" "appmanifest_70.acf" "${serverfiles}/steamapps" "nochmodx" "norun" "noforce" "nohash"
  358. elif [ "${shortname}" == "dod" ]; then
  359. fn_fetch_file_github "lgsm/data/appmanifest/${shortname}" "appmanifest_90.acf" "${serverfiles}/steamapps" "nochmodx" "norun" "noforce" "nohash"
  360. fn_fetch_file_github "lgsm/data/appmanifest/${shortname}" "appmanifest_10.acf" "${serverfiles}/steamapps" "nochmodx" "norun" "noforce" "nohash"
  361. fn_fetch_file_github "lgsm/data/appmanifest/${shortname}" "appmanifest_30.acf" "${serverfiles}/steamapps" "nochmodx" "norun" "noforce" "nohash"
  362. fn_fetch_file_github "lgsm/data/appmanifest/${shortname}" "appmanifest_70.acf" "${serverfiles}/steamapps" "nochmodx" "norun" "noforce" "nohash"
  363. elif [ "${shortname}" == "hldm" ]; then
  364. fn_fetch_file_github "lgsm/data/appmanifest/${shortname}" "appmanifest_90.acf" "${serverfiles}/steamapps" "nochmodx" "norun" "noforce" "nohash"
  365. fn_fetch_file_github "lgsm/data/appmanifest/${shortname}" "appmanifest_10.acf" "${serverfiles}/steamapps" "nochmodx" "norun" "noforce" "nohash"
  366. fn_fetch_file_github "lgsm/data/appmanifest/${shortname}" "appmanifest_70.acf" "${serverfiles}/steamapps" "nochmodx" "norun" "noforce" "nohash"
  367. elif [ "${shortname}" == "ns" ]; then
  368. fn_fetch_file_github "lgsm/data/appmanifest/${shortname}" "appmanifest_90.acf" "${serverfiles}/steamapps" "nochmodx" "norun" "noforce" "nohash"
  369. fn_fetch_file_github "lgsm/data/appmanifest/${shortname}" "appmanifest_10.acf" "${serverfiles}/steamapps" "nochmodx" "norun" "noforce" "nohash"
  370. fn_fetch_file_github "lgsm/data/appmanifest/${shortname}" "appmanifest_70.acf" "${serverfiles}/steamapps" "nochmodx" "norun" "noforce" "nohash"
  371. elif [ "${shortname}" == "opfor" ]; then
  372. fn_fetch_file_github "lgsm/data/appmanifest/${shortname}" "appmanifest_90.acf" "${serverfiles}/steamapps" "nochmodx" "norun" "noforce" "nohash"
  373. fn_fetch_file_github "lgsm/data/appmanifest/${shortname}" "appmanifest_10.acf" "${serverfiles}/steamapps" "nochmodx" "norun" "noforce" "nohash"
  374. fn_fetch_file_github "lgsm/data/appmanifest/${shortname}" "appmanifest_50.acf" "${serverfiles}/steamapps" "nochmodx" "norun" "noforce" "nohash"
  375. fn_fetch_file_github "lgsm/data/appmanifest/${shortname}" "appmanifest_70.acf" "${serverfiles}/steamapps" "nochmodx" "norun" "noforce" "nohash"
  376. elif [ "${shortname}" == "ricochet" ]; then
  377. fn_fetch_file_github "lgsm/data/appmanifest/${shortname}" "appmanifest_90.acf" "${serverfiles}/steamapps" "nochmodx" "norun" "noforce" "nohash"
  378. fn_fetch_file_github "lgsm/data/appmanifest/${shortname}" "appmanifest_10.acf" "${serverfiles}/steamapps" "nochmodx" "norun" "noforce" "nohash"
  379. fn_fetch_file_github "lgsm/data/appmanifest/${shortname}" "appmanifest_60.acf" "${serverfiles}/steamapps" "nochmodx" "norun" "noforce" "nohash"
  380. fn_fetch_file_github "lgsm/data/appmanifest/${shortname}" "appmanifest_70.acf" "${serverfiles}/steamapps" "nochmodx" "norun" "noforce" "nohash"
  381. elif [ "${shortname}" == "tfc" ]; then
  382. fn_fetch_file_github "lgsm/data/appmanifest/${shortname}" "appmanifest_90.acf" "${serverfiles}/steamapps" "nochmodx" "norun" "noforce" "nohash"
  383. fn_fetch_file_github "lgsm/data/appmanifest/${shortname}" "appmanifest_10.acf" "${serverfiles}/steamapps" "nochmodx" "norun" "noforce" "nohash"
  384. fn_fetch_file_github "lgsm/data/appmanifest/${shortname}" "appmanifest_20.acf" "${serverfiles}/steamapps" "nochmodx" "norun" "noforce" "nohash"
  385. fn_fetch_file_github "lgsm/data/appmanifest/${shortname}" "appmanifest_70.acf" "${serverfiles}/steamapps" "nochmodx" "norun" "noforce" "nohash"
  386. elif [ "${shortname}" == "ts" ]; then
  387. fn_fetch_file_github "lgsm/data/appmanifest/${shortname}" "appmanifest_90.acf" "${serverfiles}/steamapps" "nochmodx" "norun" "noforce" "nohash"
  388. fn_fetch_file_github "lgsm/data/appmanifest/${shortname}" "appmanifest_10.acf" "${serverfiles}/steamapps" "nochmodx" "norun" "noforce" "nohash"
  389. fn_fetch_file_github "lgsm/data/appmanifest/${shortname}" "appmanifest_70.acf" "${serverfiles}/steamapps" "nochmodx" "norun" "noforce" "nohash"
  390. elif [ "${shortname}" == "vs" ]; then
  391. fn_fetch_file_github "lgsm/data/appmanifest/${shortname}" "appmanifest_90.acf" "${serverfiles}/steamapps" "nochmodx" "norun" "noforce" "nohash"
  392. fn_fetch_file_github "lgsm/data/appmanifest/${shortname}" "appmanifest_10.acf" "${serverfiles}/steamapps" "nochmodx" "norun" "noforce" "nohash"
  393. fn_fetch_file_github "lgsm/data/appmanifest/${shortname}" "appmanifest_70.acf" "${serverfiles}/steamapps" "nochmodx" "norun" "noforce" "nohash"
  394. fi
  395. fn_dl_steamcmd
  396. fi
  397. fi
  398. }