BaseTools: Update BrotliCompress script to handle the different input format
After this update, BrotliCompress can support below styles. BrotliCompress -e InputFile -o OutputFile BrotliCompress -e -o OutputFile InputFile Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Liming Gao <liming.gao@intel.com> Reviewed-by: Yonghong Zhu <yonghong.zhu@intel.com>
This commit is contained in:
@@ -16,12 +16,16 @@
|
||||
|
||||
set QLT=-q 9
|
||||
set INPUTFLAG=0
|
||||
set ARGS=
|
||||
|
||||
:Begin
|
||||
if "%1"=="" goto End
|
||||
|
||||
if "%1"=="-d" (
|
||||
set INPUTFLAG=1
|
||||
set ARGS=%ARGS% %1
|
||||
shift
|
||||
goto Begin
|
||||
)
|
||||
|
||||
if "%1"=="-e" (
|
||||
@@ -51,17 +55,15 @@ if "%1"=="-q" (
|
||||
goto Begin
|
||||
)
|
||||
|
||||
if %INPUTFLAG%==1 (
|
||||
if "%2"=="" (
|
||||
set ARGS=%ARGS% %QLT% -i %1
|
||||
goto End
|
||||
)
|
||||
if %INPUTFLAG% == 1 (
|
||||
set ARGS=%ARGS% -i %1
|
||||
set INPUTFLAG=0
|
||||
) else (
|
||||
set ARGS=%ARGS% %1
|
||||
)
|
||||
|
||||
set ARGS=%ARGS% %1
|
||||
shift
|
||||
goto Begin
|
||||
|
||||
:End
|
||||
Brotli %ARGS%
|
||||
Brotli %ARGS% %QLT%
|
||||
@echo on
|
||||
|
Reference in New Issue
Block a user