dv_blahaj/package.ps1

13 lines
437 B
PowerShell
Raw Permalink Normal View History

2024-01-05 13:38:32 +00:00
$DVInstallDir = "D:\Programs\Derail Valley"
Set-Location "$PSScriptRoot"
$FilesToInclude = "info.json","LICENSE","README.md","items/*"
$modInfo = Get-Content -Raw -Path "info.json" | ConvertFrom-Json
$modId = $modInfo.Id
$modVersion = $modInfo.Version
$OutputDirectory = "$DVInstallDir/Mods/$modId"
New-Item "$OutputDirectory" -ItemType Directory -Force
Copy-Item -Force -Recurse -Path $FilesToInclude -Destination "$OutputDirectory"