14 lines
478 B
Plaintext
14 lines
478 B
Plaintext
$ErrorActionPreference = 'Stop'
|
|
$inputs = @PSC_INPUT_FILES@
|
|
$outputDir = '@PSC_OUTPUT_DIR@'
|
|
$format = '@PSC_FORMAT@'
|
|
$dotExe = '@PSC_DOT_EXECUTABLE@'
|
|
New-Item -ItemType Directory -Force -Path $outputDir | Out-Null
|
|
foreach ($inputFile in $inputs) {
|
|
$name = [System.IO.Path]::GetFileNameWithoutExtension($inputFile)
|
|
& $dotExe ('-T' + $format) $inputFile '-o' (Join-Path $outputDir ($name + '.' + $format))
|
|
if ($LASTEXITCODE -ne 0) {
|
|
exit $LASTEXITCODE
|
|
}
|
|
}
|