install.ps1 723 B

1234567891011121314151617181920
  1. #!/usr/bin/env pwsh
  2. $IDF_PATH = $PSScriptRoot
  3. $TARGETS = (python "$IDF_PATH/tools/install_util.py" extract targets "$args")
  4. Write-Output "Installing ESP-IDF tools"
  5. Start-Process -Wait -NoNewWindow -FilePath "python" -Args "$IDF_PATH/tools/idf_tools.py install --targets=${TARGETS}"
  6. if ($LASTEXITCODE -ne 0) { exit $LASTEXITCODE } # if error
  7. $FEATURES = (python "$IDF_PATH/tools/install_util.py" extract features "$args")
  8. Write-Output "Setting up Python environment"
  9. Start-Process -Wait -NoNewWindow -FilePath "python" -Args "$IDF_PATH/tools/idf_tools.py install-python-env --features=${FEATURES}"
  10. if ($LASTEXITCODE -ne 0) { exit $LASTEXITCODE} # if error
  11. Write-Output "
  12. All done! You can now run:
  13. export.ps1
  14. "