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