This is just a quick little PowerShell script to update Oxide on my Rust Server with 1 button, You could also add it as a scheduled task to run automatically at server restarts. **This will only work on Windows based Rust servers** unless you install PowerShell for Linux
Just copy the below to a .txt file and save as a .ps1 file and should be good to go after you change the paths.
The First line downloads the current Oxide version from uMod to a folder you specify in -OutFile "ADD DOWNLOAD PATH HERE"
Second line Extracts the Zip file from the download path to a folder you specify in -DestinationPath "ADD UNZIPED PATH HERE"
Third line does a force move and overwrite of the oxide data from the extractes folder to the Rust Dedicated Data folder as shown here Move-Item -Path "ADD Oxide Rust / RustDedicated_Data PATH HERE FROM EXTRACTED ZIP FILE HERE" -Destination "ADD SERVER PATH HERE" -force
The Fourth and Fifth lines clear out BOTH the downloaded .zip and the extracted folder so the script can run the next time its called and not have to worry about any conflicts
As an example of the paths used (See Below). You could just copy and paste this and chance the Folder Paths to suit your needs. This could probably be better optimised and simplified but it works for me and thought I would share it with others that are looking for a simple way to automate the oxide update process.
Invoke-WebRequest "https://umod.org/games/rust/download" -OutFile "D:\Oxide Rust.zip" #Initial Download of .zip
Expand-Archive -Path "D:\Oxide Rust.Zip" -DestinationPath "D:\Oxide Rust" #Extract .zip to folder
Move-Item -Path "D:\Oxide Rust\RustDedicated_Data" -Destination "H:\rust" -force #Move the Dedicated date folder to server Folder
Remove-Item "D:\Oxide Rust.zip" -Force #removes downloaded .zip
Get-ChildItem "D:\Oxide Rust" -Include * -Recurse | Remove-Item #clears extracted folder
This should work for most people but I make no guarantees