File size: 516 Bytes
fc85133
 
 
2a8d2d3
10695bc
 
 
 
fc85133
 
2a8d2d3
 
 
 
 
fc85133
10695bc
fc85133
10695bc
 
 
fc85133
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
param(
	[Parameter(Position = 0)]
	[ValidateSet("build", "source", "check")]
	[string]$Command = "build",

	[Parameter(Position = 1)]
	[ValidateRange(1, 64)]
	[int]$Jobs = [Math]::Min([Math]::Max([Environment]::ProcessorCount - 1, 1), 8)
)

if ($Command -eq "check") {
	Write-Error "Use node tools/validate.mjs"
	exit 1
}

$ErrorActionPreference = "Stop"
$script = Join-Path $PSScriptRoot "localisation.mjs"

& node $script $Command --jobs $Jobs
if ($LASTEXITCODE -ne 0) {
	throw "Localisation '$Command' failed."
}