Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/bash
- # Конфигурация
- STEAMCMD=/home/steam/steamcmd
- UPDATEMOD=true
- UPDATEGAME=false
- BAROTRAUMADIR=/home/steam/games/barotraumaserver
- APPID=1026340
- GAMEID=602960
- MODID=2826890267
- # Обновляю игру
- if [ "$UPDATEGAME" = true ]
- then
- echo 'ОБНОВЛЕНИЕ ИГРЫ'
- # UPDATE GAME
- bash $STEAMCMD +force_install_dir $BAROTRAUMADIR +login anonymous +app_update $APPID -validate +quit
- echo 'ОБНОВЛЕНИЕ ИГРЫ ЗАВЕРШЕНО'
- # LUACS FOR BAROTRAUMA
- echo 'УСТАНОВКА LUA FOR BAROTRAUMA'
- mkdir $BAROTRAUMADIR/staging
- LUASERVER="luacsforbarotrauma_build_linux_server.tar.gz"
- LUAPATCH="luacsforbarotrauma_patch_linux_server.tar.gz"
- wget -P $BAROTRAUMADIR/staging https://github.com/evilfactory/LuaCsForBarotrauma/releases/download/latest/$LUASERVER
- tar -xvzf $BAROTRAUMADIR/staging/$LUASERVER -C $BAROTRAUMADIR/staging
- rm $BAROTRAUMADIR/staging/$LUASERVER
- wget -P $BAROTRAUMADIR/staging https://github.com/evilfactory/LuaCsForBarotrauma/releases/download/latest/$LUAPATCH
- tar -xvzf $BAROTRAUMADIR/staging/$LUAPATCH -C $BAROTRAUMADIR/staging
- rm $BAROTRAUMADIR/staging/$LUAPATCH
- rm -rf $BAROTRAUMADIR/staging/Data $BAROTRAUMADIR/staging/LocalMods
- cp -R $BAROTRAUMADIR/staging/* $BAROTRAUMADIR
- rm -rf $BAROTRAUMADIR/staging
- # PERFOMANCE FIX
- bash $STEAMCMD +force_install_dir $BAROTRAUMADIR +login anonymous +workshop_download_item $GAMEID 2701251094 -validate +quit
- cp -R $BAROTRAUMADIR/steamapps/workshop/content/$GAMEID/2701251094/Lua/* $BAROTRAUMADIR/Lua
- rm -rf $BAROTRAUMADIR/steamapps/workshop/content/$GAMEID/2701251094
- echo 'УСТАНОВКА LUA FOR BAROTRAUMA ЗАВЕРШЕНА'
- fi
- # Обновляю мод
- if [ "$UPDATEMOD" = true ]
- then
- echo 'ОБНОВЛЕНИЕ МОДА'
- bash $STEAMCMD +force_install_dir $BAROTRAUMADIR +login anonymous +workshop_download_item $GAMEID $MODID -validate +quit
- rm -rf $BAROTRAUMADIR/LocalMods/$MODID
- mv $BAROTRAUMADIR/steamapps/workshop/content/$GAMEID/$MODID $BAROTRAUMADIR/LocalMods/
- echo 'ОБНОВЛЕНИЕ МОДА ЗАВЕРШЕНО'
- fi
- # Запускаю игру
- cd $BAROTRAUMADIR
- ./DedicatedServer
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement