-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathDownloadCleanSources.bat
More file actions
48 lines (37 loc) · 1.31 KB
/
Copy pathDownloadCleanSources.bat
File metadata and controls
48 lines (37 loc) · 1.31 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
@echo off
cd %~dp0
set oxidemod_archive=Archives\OxideMod
set depotdownloader_extracted=DepotDownloader
set clearSources=ClearSources
set managed=RustDedicated_Data\Managed
for /f %%i in ('dir %oxidemod_archive% /b/a-d/o-d/t:c') do (
set LatestOxide=%%i
goto OxideFound
)
echo Oxide not found, download references first.
goto End
:OxideFound
echo Last known oxide version is %LatestOxide%
echo Downloading latest game sources
dotnet %depotdownloader_extracted%\DepotDownloader.dll -app 258550 -depot 258551 -dir %clearSources% -filelist .references -validate
echo Extracting latest known oxide core dlls
cd %clearSources%
tar -xf ..\%oxidemod_archive%\%LatestOxide% RustDedicated_Data/Managed/Oxide*
if errorlevel 1 (
echo Failed to unzip OxideMod archive!
goto End
)
cd ..
IF EXIST "%clearSources%\%managed%\OxidePatcher.exe" (
echo OxidePatcher already downloaded
) ELSE (
echo getting latest version of OxidePatcher
curl -L https://github.com/OxideMod/OxidePatcher/releases/download/latest/OxidePatcher.exe -o %clearSources%\%managed%\OxidePatcher.exe
)
echo Getting latest version of Rust.obj
curl -L https://raw.githubusercontent.com/OxideMod/Oxide.Rust/develop/resources/Rust.opj -o%clearSources%\%managed%\Rust.opj
echo Deleting old _original
del /s /q %clearSources%\%managed%\*_original*
echo Done.
:End
pause