Добавлена функция установки конфига; Изменена архитектура bat файла для работы с аргументами -mode
This commit is contained in:
@@ -17,12 +17,12 @@ if ($form) {
|
||||
$uriBuilder.Query = $queryString
|
||||
$downloadUrl = $uriBuilder.Uri.AbsoluteUri
|
||||
|
||||
Write-Host "[INFO] Downloading..."
|
||||
Write-Host "[INFO] Downloading mods..."
|
||||
Invoke-WebRequest -Uri $downloadUrl -WebSession $session -OutFile $outputFile
|
||||
Write-Host "[INFO] The file was successfully downloaded with confirmation."
|
||||
}
|
||||
else {
|
||||
Write-Host "[INFO] Downloading..."
|
||||
Write-Host "[INFO] Downloading mods..."
|
||||
Invoke-WebRequest -Uri $baseUrl -OutFile $outputFile
|
||||
Write-Host "[INFO] The file was successfully downloaded directly."
|
||||
}
|
||||
@@ -31,6 +31,9 @@ $scriptDir = Split-Path -Parent $MyInvocation.MyCommand.Definition
|
||||
$rimworldMods = Resolve-Path (Join-Path $scriptDir "..")
|
||||
|
||||
$sourceFolder = Get-ChildItem $outputFile | Select-Object -First 1
|
||||
Move-Item -Path $sourceFolder.FullName -Destination $rimworldMods
|
||||
Copy-Item -Path $sourceFolder.FullName -Destination $rimworldMods
|
||||
|
||||
Write-Host "[INFO] Cleaning up..."
|
||||
Remove-Item $outputFile
|
||||
|
||||
Write-Host "[INFO] The ruinship_mods.rar file has been installed to the path $rimworldMods. Please extract it to install all the necessary mods." -ForegroundColor Green
|
||||
|
||||
Reference in New Issue
Block a user