injuu-kangoku-re/scripts/pack_ysbin.ps1
2026-05-16 15:06:19 -05:00

18 lines
434 B
PowerShell

#Requires -Version 5.1
<#
.SYNOPSIS
Pack JSON into ysbin.ypf (restores ysbin.ypf.bak first, then runs ysbin-patch pack).
.EXAMPLE
.\scripts\pack_ysbin.ps1
ysbin-patch.bat pack
#>
param()
$ErrorActionPreference = 'Stop'
$patch = Join-Path (Split-Path $PSScriptRoot -Parent) 'ysbin-patch.ps1'
if (-not (Test-Path -LiteralPath $patch)) {
throw "Missing $patch"
}
& $patch pack
if ($LASTEXITCODE -ne 0) { exit $LASTEXITCODE }