Advertisement
Guest User

updateUMod.ps1

a guest
Jun 20th, 2020
647
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. # Download latest uMod for Rust
  2. Write-Host Determining latest uMod release . . .
  3. $tag = (Invoke-WebRequest https://umod.org/games/rust.json | ConvertFrom-Json)[0].latest_release_version
  4. if (Test-Path -Path temp\uMod$tag.zip) {
  5.     Write-Host uMod $tag is already up to date.
  6. } else {
  7.     Remove-Item .\temp\*.zip -Force
  8.     Write-Host Downloading uMod $tag . . .
  9.     Invoke-WebRequest https://umod.org/games/rust/download -Out .\temp\uMod$tag.zip
  10.     Write-Host Extracting uMod $tag . . .
  11.     Expand-Archive -DestinationPath . .\temp\uMod$tag.zip -Force
  12. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement