4
0

core_steamcmd.sh 20 KB

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