-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathexecutar_run.ps1
More file actions
31 lines (23 loc) · 890 Bytes
/
Copy pathexecutar_run.ps1
File metadata and controls
31 lines (23 loc) · 890 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
$ProjectRoot = Split-Path -Parent $MyInvocation.MyCommand.Path
Set-Location $ProjectRoot
$env:PYTHONPATH = Join-Path $ProjectRoot "src"
$env:PYTHONUTF8 = "1"
$RunDir = Join-Path $ProjectRoot "run"
Write-Host "`nExecutando todos os arquivos .jss em: run\" -ForegroundColor Cyan
$Files = Get-ChildItem -Path $RunDir -Filter "*.jss" -File | Sort-Object Name
if (-not $Files) {
Write-Host "`nNenhum arquivo .jss encontrado na pasta run\." -ForegroundColor Yellow
exit 1
}
foreach ($File in $Files) {
Write-Host "`n----------------------------------------" -ForegroundColor DarkGray
Write-Host "Arquivo: $($File.Name)" -ForegroundColor White
$Output = python .\main.py $File.FullName 2>&1
if ($Output) {
$Output | ForEach-Object { Write-Host $_ }
}
else {
Write-Host "(sem saida)"
}
}
Write-Host "`nFinalizado." -ForegroundColor Green