Advertisement
HomelessMage

barotrauma.sh

Sep 20th, 2023
1,034
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 2.31 KB | Gaming | 0 0
  1. #!/bin/bash
  2. # Конфигурация
  3. STEAMCMD=/home/steam/steamcmd
  4. UPDATEMOD=true
  5. UPDATEGAME=false
  6. BAROTRAUMADIR=/home/steam/games/barotraumaserver
  7. APPID=1026340
  8. GAMEID=602960
  9. MODID=2826890267
  10.  
  11. # Обновляю игру
  12. if [ "$UPDATEGAME" = true ]
  13. then
  14.         echo 'ОБНОВЛЕНИЕ ИГРЫ'
  15.         # UPDATE GAME
  16.         bash $STEAMCMD +force_install_dir $BAROTRAUMADIR +login anonymous +app_update $APPID -validate +quit
  17.         echo 'ОБНОВЛЕНИЕ ИГРЫ ЗАВЕРШЕНО'
  18.         # LUACS FOR BAROTRAUMA
  19.         echo 'УСТАНОВКА LUA FOR BAROTRAUMA'
  20.         mkdir $BAROTRAUMADIR/staging
  21.         LUASERVER="luacsforbarotrauma_build_linux_server.tar.gz"
  22.         LUAPATCH="luacsforbarotrauma_patch_linux_server.tar.gz"
  23.         wget -P $BAROTRAUMADIR/staging https://github.com/evilfactory/LuaCsForBarotrauma/releases/download/latest/$LUASERVER
  24.         tar -xvzf $BAROTRAUMADIR/staging/$LUASERVER -C $BAROTRAUMADIR/staging
  25.         rm $BAROTRAUMADIR/staging/$LUASERVER
  26.         wget -P $BAROTRAUMADIR/staging https://github.com/evilfactory/LuaCsForBarotrauma/releases/download/latest/$LUAPATCH
  27.         tar -xvzf $BAROTRAUMADIR/staging/$LUAPATCH -C $BAROTRAUMADIR/staging
  28.         rm $BAROTRAUMADIR/staging/$LUAPATCH
  29.         rm -rf $BAROTRAUMADIR/staging/Data $BAROTRAUMADIR/staging/LocalMods
  30.         cp -R $BAROTRAUMADIR/staging/* $BAROTRAUMADIR
  31.         rm -rf $BAROTRAUMADIR/staging
  32.         # PERFOMANCE FIX
  33.         bash $STEAMCMD +force_install_dir $BAROTRAUMADIR +login anonymous +workshop_download_item $GAMEID 2701251094 -validate +quit
  34.         cp -R $BAROTRAUMADIR/steamapps/workshop/content/$GAMEID/2701251094/Lua/* $BAROTRAUMADIR/Lua
  35.         rm -rf $BAROTRAUMADIR/steamapps/workshop/content/$GAMEID/2701251094
  36.         echo 'УСТАНОВКА LUA FOR BAROTRAUMA ЗАВЕРШЕНА'
  37. fi
  38.  
  39. # Обновляю мод
  40. if [ "$UPDATEMOD" = true ]
  41. then
  42.         echo 'ОБНОВЛЕНИЕ МОДА'
  43.         bash $STEAMCMD +force_install_dir $BAROTRAUMADIR +login anonymous +workshop_download_item $GAMEID $MODID -validate +quit
  44.         rm -rf $BAROTRAUMADIR/LocalMods/$MODID
  45.         mv $BAROTRAUMADIR/steamapps/workshop/content/$GAMEID/$MODID $BAROTRAUMADIR/LocalMods/
  46.         echo 'ОБНОВЛЕНИЕ МОДА ЗАВЕРШЕНО'
  47. fi
  48. # Запускаю игру
  49. cd $BAROTRAUMADIR
  50. ./DedicatedServer
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement