AppendPackagesPath.bat 1.0 KB

123456789101112131415161718192021222324252627282930313233
  1. @REM @file
  2. @REM Windows batch file to set PACKAGES_PATH environment
  3. @REM
  4. @REM Copyright (c) 2020, Intel Corporation. All rights reserved.<BR>
  5. @REM SPDX-License-Identifier: BSD-2-Clause-Patent
  6. @REM
  7. @REM This script calls GetPackagesPath.py to collect all package paths under
  8. @REM specified directories and appends them to PACKAGES_PATH environment
  9. @REM variable. A sub directory is a qualified package path when an EDKII
  10. @REM Package can be found under it.
  11. @echo off
  12. @if /I "%1"=="" @goto Usage
  13. @if /I "%1"=="-h" @goto Usage
  14. @if /I "%1"=="--help" @goto Usage
  15. @if /I "%1"=="/?" @goto Usage
  16. for /f %%i in ('python %~dp0\GetPackagesPath.py %*') do (
  17. if defined PACKAGES_PATH (
  18. set "PACKAGES_PATH=%PACKAGES_PATH%;%%i"
  19. ) else (
  20. set "PACKAGES_PATH=%%i"
  21. )
  22. )
  23. @goto End
  24. :Usage
  25. @echo Usage: AppendPackagesPath.bat directory [directory ...]
  26. @echo Copyright(c) 2020, Intel Corporation. All rights reserved.
  27. @echo Options:
  28. @echo --help, -h Print this help screen and exit
  29. :End