mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2025-08-21 22:03:42 -07:00
parent
430c53a7ac
commit
199c1b3c9b
1 changed files with 56 additions and 2 deletions
58
appveyor.yml
58
appveyor.yml
|
@ -77,9 +77,63 @@ clone_script:
|
||||||
|
|
||||||
$env:Path = "C:\ProxSpace\msys2\usr\bin;C:\ProxSpace\msys2\mingw32\bin;C:\ProxSpace\gcc-arm-none-eabi\bin;$env:Path"
|
$env:Path = "C:\ProxSpace\msys2\usr\bin;C:\ProxSpace\msys2\mingw32\bin;C:\ProxSpace\gcc-arm-none-eabi\bin;$env:Path"
|
||||||
|
|
||||||
C:\ProxSpace\msys2\msys2_shell.cmd -mingw32 -defterm -no-start /dev/null 1> msys1.txt 2>&1
|
Function ExecUpdate($Name, $Cmd, $ErrorLine) {
|
||||||
|
|
||||||
C:\ProxSpace\msys2\msys2_shell.cmd -mingw32 -defterm -no-start /dev/null 1> msys1.txt 2>&1
|
#--- begin Job
|
||||||
|
|
||||||
|
$Job = Start-Job -Name "$Name" -ScriptBlock {
|
||||||
|
$env:Path = "C:\ProxSpace\msys\bin;$env:Path"
|
||||||
|
Set-Location $using:PWD
|
||||||
|
|
||||||
|
$sb=[scriptblock]::Create("$using:Cmd")
|
||||||
|
#execute scriptblock
|
||||||
|
$Cond=&$sb
|
||||||
|
|
||||||
|
return $Cond
|
||||||
|
}
|
||||||
|
|
||||||
|
#--- end Job
|
||||||
|
|
||||||
|
$JobTime=[System.Environment]::TickCount
|
||||||
|
while($true) {
|
||||||
|
Receive-Job -Job $Job -Keep -OutVariable Res 2>&1 6>&1 | Out-Null
|
||||||
|
|
||||||
|
if ($Res -is "String" -and $Res -like "*$ErrorLine*"){
|
||||||
|
Write-host "Exit by stop phrase"
|
||||||
|
break
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($Res -is [Object]){
|
||||||
|
[bool]$needexit = $false
|
||||||
|
ForEach($line in $Res){
|
||||||
|
if ($line -like "*$ErrorLine*"){
|
||||||
|
Write-host "Exit by stop phrase [obj]"
|
||||||
|
$needexit = $true
|
||||||
|
break
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if ($needexit) {
|
||||||
|
break
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if(Wait-Job $Job -Timeout 5){
|
||||||
|
Write-host "Exit by end job"
|
||||||
|
break
|
||||||
|
}
|
||||||
|
|
||||||
|
if ([System.Environment]::TickCount-$JobTime -gt 600000) {
|
||||||
|
Write-host "Exit by timeout"
|
||||||
|
break
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
Remove-Job -Force $Job
|
||||||
|
}
|
||||||
|
|
||||||
|
ExecUpdate "update1" "C:\ProxSpace\msys2\msys2_shell.cmd -mingw32 -defterm -no-start /dev/null" "terminate?MSYS2"
|
||||||
|
|
||||||
|
ExecUpdate "update2" "C:\ProxSpace\msys2\msys2_shell.cmd -mingw32 -defterm -no-start /dev/null" "terminate?MSYS2"
|
||||||
|
|
||||||
Write-Host "[ OK ]" -ForegroundColor Green
|
Write-Host "[ OK ]" -ForegroundColor Green
|
||||||
install:
|
install:
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue