install.ps1 749 B

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