]> git.proxmox.com Git - mirror_edk2.git/blobdiff - BaseTools/Source/C/BrotliCompress/BrotliCompress.bat
BaseTools: Add --version option in Brotli and BrotliCompress
[mirror_edk2.git] / BaseTools / Source / C / BrotliCompress / BrotliCompress.bat
index 257bf1e9abf3ec8d16a7f5c7513ceffa14b88163..b291ff07f89e6b252fc8df8441c017f1e370aaad 100644 (file)
 @echo off\r
 @setlocal\r
 \r
-set LVL=--quality 9\r
+set QLT=-q 9\r
+set INPUTFLAG=0\r
 \r
 :Begin\r
 if "%1"=="" goto End\r
 \r
 if "%1"=="-d" (\r
-  set ARGS=%ARGS% --decompress\r
-  shift\r
-  goto Begin\r
+  set INPUTFLAG=1\r
 )\r
 \r
 if "%1"=="-e" (\r
+  set INPUTFLAG=1\r
   shift\r
   goto Begin\r
 )\r
 \r
 if "%1"=="-g" (\r
-  set ARGS=%ARGS% --gap %2\r
+  set ARGS=%ARGS% %1 %2\r
   shift\r
   shift\r
   goto Begin\r
 )\r
 \r
-if "%1"=="-l" (\r
-  set LVL=--quality %2\r
+if "%1"=="-o" (\r
+  set ARGS=%ARGS% %1 %2\r
   shift\r
   shift\r
   goto Begin\r
 )\r
 \r
-if "%1"=="-o" (\r
-  set ARGS=%ARGS% --output %2\r
-  set INTMP=%2\r
+if "%1"=="-q" (\r
+  set QLT=%1 %2\r
   shift\r
   shift\r
   goto Begin\r
 )\r
 \r
-set ARGS=%ARGS% --input %1\r
+if %INPUTFLAG%==1 (\r
+ if "%2"=="" (\r
+    set ARGS=%ARGS% %QLT% -i %1\r
+    goto End\r
+  )\r
+)\r
+\r
+set ARGS=%ARGS% %1\r
 shift\r
 goto Begin\r
 \r
 :End\r
-Brotli %ARGS% %LVL%\r
+Brotli %ARGS%\r
 @echo on\r