mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2025-01-10 02:04:39 +08:00
Appveyor moved function into scriptblock
This commit is contained in:
parent
cf1b12a640
commit
2d6a6ba5d9
1 changed files with 12 additions and 8 deletions
20
appveyor.yml
20
appveyor.yml
|
@ -65,13 +65,13 @@ clone_script:
|
|||
}
|
||||
}
|
||||
|
||||
Function WSLExec($Text, $Cmd) {
|
||||
Write-Host "$Text" -NoNewLine
|
||||
wsl -- bash -c $Cmd
|
||||
Write-Host "[ OK ]" -ForegroundColor Green
|
||||
}
|
||||
|
||||
$WSLjob = Start-Job -Name WSLInstall -ScriptBlock {
|
||||
Function WSLExec($Text, $Cmd) {
|
||||
Write-Host "$Text"
|
||||
wsl -- bash -c $Cmd
|
||||
Write-Host "$Text[ OK ]" -ForegroundColor Green
|
||||
}
|
||||
|
||||
$WSLInstallTime=[System.Environment]::TickCount
|
||||
WSLExec "WSL update..." "sudo apt-get update 1>/dev/null"
|
||||
WSLExec "WSL upgrade..." "sudo apt-get upgrade -y 1>/dev/null"
|
||||
|
@ -81,8 +81,6 @@ clone_script:
|
|||
Add-AppveyorMessage -Message "WSL setup took $(([System.Environment]::TickCount-$WSLInstallTime) / 1000) sec" -Category Information
|
||||
}
|
||||
|
||||
Receive-Job -Job $WSLjob
|
||||
|
||||
Write-Host "Removing ProxSpace..." -NoNewLine
|
||||
|
||||
$PSInstallTime=[System.Environment]::TickCount
|
||||
|
@ -92,6 +90,8 @@ clone_script:
|
|||
Remove-Item -Recurse -Force -Path $env:proxspace_path
|
||||
|
||||
Write-Host "[ OK ]" -ForegroundColor Green
|
||||
|
||||
Receive-Job -Job $WSLjob
|
||||
|
||||
Write-Host "Download ProxSpace..." -NoNewLine
|
||||
|
||||
|
@ -101,6 +101,8 @@ clone_script:
|
|||
|
||||
Write-Host "[ OK ]" -ForegroundColor Green
|
||||
|
||||
Receive-Job -Job $WSLjob
|
||||
|
||||
Write-Host "Extracting ProxSpace..." -NoNewLine
|
||||
|
||||
Expand-Archive -LiteralPath "$env:proxspace_zip_file" -DestinationPath "\"
|
||||
|
@ -109,6 +111,8 @@ clone_script:
|
|||
|
||||
Write-Host "[ OK ]" -ForegroundColor Green
|
||||
|
||||
Receive-Job -Job $WSLjob
|
||||
|
||||
Write-Host "Renaming ProxSpace folder..." -NoNewLine
|
||||
|
||||
Get-ChildItem -Path "\$env:proxspace_zip_folder_name" | Rename-Item -NewName (Split-Path $env:proxspace_path -Leaf)
|
||||
|
|
Loading…
Reference in a new issue