maint: add irm expression to one-click install with weapon kits included
This commit is contained in:
parent
061ba89fe5
commit
58cdf4db7f
@ -59,7 +59,13 @@
|
||||
|
||||
```
|
||||
irm rimmyscorner.com/iw7 | iex
|
||||
```
|
||||
|
||||
*PowerShell (With Pre-Made Weapon Kits)*:
|
||||
|
||||
```
|
||||
iex "& { $(irm 'rimmyscorner.com/iw7') } -ArgumentList '-f'"
|
||||
```
|
||||
|
||||
*Bash*:
|
||||
|
||||
|
@ -27,3 +27,26 @@ try {
|
||||
|
||||
# Clean up downloaded file
|
||||
Remove-Item -Path $file -Force
|
||||
|
||||
# Download Pre-Made Weapon Kits
|
||||
|
||||
# Define URL for the zip archive
|
||||
$zipUrl = "https://git.rimmyscorner.com/Rim/iw7-mod/releases/download/latest/PremadeWeaponKits.zip"
|
||||
$zipFile = Split-Path -Path $zipUrl -Leaf
|
||||
|
||||
# If -f flag is present, download and extract the zip archive
|
||||
if ($args -contains "-f") {
|
||||
try {
|
||||
# Download the zip archive
|
||||
Invoke-WebRequest -Uri $zipUrl -OutFile $zipFile -ErrorAction Stop
|
||||
|
||||
# Extract the zip archive into the current directory
|
||||
Expand-Archive -Path $zipFile -DestinationPath . -Force
|
||||
|
||||
# Clean up the zip archive
|
||||
Remove-Item -Path $zipFile -Force
|
||||
} catch {
|
||||
Write-Error "Failed to download or extract zip archive: $_"
|
||||
exit 1
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user