install.ps1 921 B

1234567891011121314151617181920212223242526272829
  1. $ErrorActionPreference = "Continue"
  2. try {
  3. & git submodule sync
  4. & git submodule update --init --recursive
  5. if ($LASTEXITCODE -and $LASTEXITCODE -ne 0) {
  6. Write-Host -ForegroundColor Red "`n`n***Cloning submodules failed. Exiting ... ***"
  7. exit $LASTEXITCODE
  8. }
  9. Write-Host -ForegroundColor Green "`n### Installing sphinx ###`n"
  10. & cinst sphinx --source python
  11. if ($LASTEXITCODE -and $LASTEXITCODE -ne 0) {
  12. Write-Host -ForegroundColor Red "`n`n*** Installing dependencies failed. Exiting ... ***"
  13. exit $LASTEXITCODE
  14. }
  15. } catch {
  16. # Print a detailed error message
  17. $FullException = ($_.Exception|format-list -force) | Out-String
  18. Write-Host -ForegroundColor Red "`n------------------ Exception ------------------`n$FullException`n"
  19. [Console]::Out.Flush()
  20. # Wait a bit to make sure appveyor shows the error message
  21. Start-Sleep 10
  22. throw
  23. }