summaryrefslogtreecommitdiff
path: root/BaseTools/Source/C/BrotliCompress/BrotliCompress.bat
diff options
context:
space:
mode:
authorSong, BinX <binx.song@intel.com>2017-04-13 09:19:48 +0800
committerGuo Mang <mang.guo@intel.com>2017-07-12 11:24:39 +0800
commit54534525bb5da20fe0336110157fe61b8966bb74 (patch)
tree3173706b001839b13cf527c128e010ed020e8aa5 /BaseTools/Source/C/BrotliCompress/BrotliCompress.bat
parent45f18ba6cce16c9ca3d118652e14635d70b919ab (diff)
downloadedk2-platforms-54534525bb5da20fe0336110157fe61b8966bb74.tar.xz
BaseTools: Add --version option in Brotli and BrotliCompress
https://bugzilla.tianocore.org/show_bug.cgi?id=464 V2: - Add build version V1: - Add --version option in Brotli and BrotliCompress Cc: Liming Gao <liming.gao@intel.com> Cc: Yonghong Zhu <yonghong.zhu@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Bell Song <binx.song@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com> (cherry picked from commit 98cb468435be54c3191f4bca48cf5135b1927eaf)
Diffstat (limited to 'BaseTools/Source/C/BrotliCompress/BrotliCompress.bat')
-rw-r--r--BaseTools/Source/C/BrotliCompress/BrotliCompress.bat30
1 files changed, 18 insertions, 12 deletions
diff --git a/BaseTools/Source/C/BrotliCompress/BrotliCompress.bat b/BaseTools/Source/C/BrotliCompress/BrotliCompress.bat
index 257bf1e9ab..b291ff07f8 100644
--- a/BaseTools/Source/C/BrotliCompress/BrotliCompress.bat
+++ b/BaseTools/Source/C/BrotliCompress/BrotliCompress.bat
@@ -14,48 +14,54 @@
@echo off
@setlocal
-set LVL=--quality 9
+set QLT=-q 9
+set INPUTFLAG=0
:Begin
if "%1"=="" goto End
if "%1"=="-d" (
- set ARGS=%ARGS% --decompress
- shift
- goto Begin
+ set INPUTFLAG=1
)
if "%1"=="-e" (
+ set INPUTFLAG=1
shift
goto Begin
)
if "%1"=="-g" (
- set ARGS=%ARGS% --gap %2
+ set ARGS=%ARGS% %1 %2
shift
shift
goto Begin
)
-if "%1"=="-l" (
- set LVL=--quality %2
+if "%1"=="-o" (
+ set ARGS=%ARGS% %1 %2
shift
shift
goto Begin
)
-if "%1"=="-o" (
- set ARGS=%ARGS% --output %2
- set INTMP=%2
+if "%1"=="-q" (
+ set QLT=%1 %2
shift
shift
goto Begin
)
-set ARGS=%ARGS% --input %1
+if %INPUTFLAG%==1 (
+ if "%2"=="" (
+ set ARGS=%ARGS% %QLT% -i %1
+ goto End
+ )
+)
+
+set ARGS=%ARGS% %1
shift
goto Begin
:End
-Brotli %ARGS% %LVL%
+Brotli %ARGS%
@echo on