# Build 17_printer_df.qli from 17_printer_df.tpl for this system (CI-Eng-Sample, CI Server R1.03.00). # The printer device needs the CI Server node name (":FILE") and a literal output path, # so they are filled in here: node name from LOCAL_NODE_DF, path from %TLS_LST_PATH%. # Called by load.cmd; needs CI Server running. $ErrorActionPreference = 'Stop' Set-Location -LiteralPath $PSScriptRoot $null = & dssqld -e 17_node.qlo -d LOCAL_NODE_DF -c $node = $null foreach ($row in (Import-Csv 17_node.qlo)) { if ($row.NAME -eq 'THIS_NODE') { $node = $row.NODE_NAME } } Remove-Item 17_node.qlo if (-not $node) { throw 'Node name not found in LOCAL_NODE_DF' } $lst = $env:TLS_LST_PATH if (-not $lst) { throw 'TLS_LST_PATH is not set' } $text = (Get-Content -Raw 17_printer_df.tpl).Replace('', $node).Replace('', $lst) Set-Content -Encoding ascii -NoNewline -Path 17_printer_df.qli -Value $text Write-Output "17_printer_df.qli: node $node, path $lst"