diff options
author | Song, BinX <binx.song@intel.com> | 2017-04-13 09:19:48 +0800 |
---|---|---|
committer | Guo Mang <mang.guo@intel.com> | 2017-07-12 11:24:39 +0800 |
commit | 54534525bb5da20fe0336110157fe61b8966bb74 (patch) | |
tree | 3173706b001839b13cf527c128e010ed020e8aa5 /BaseTools/BinWrappers/PosixLike | |
parent | 45f18ba6cce16c9ca3d118652e14635d70b919ab (diff) | |
download | edk2-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/BinWrappers/PosixLike')
-rwxr-xr-x | BaseTools/BinWrappers/PosixLike/BrotliCompress | 29 |
1 files changed, 20 insertions, 9 deletions
diff --git a/BaseTools/BinWrappers/PosixLike/BrotliCompress b/BaseTools/BinWrappers/PosixLike/BrotliCompress index 59c6465dad..49358b2329 100755 --- a/BaseTools/BinWrappers/PosixLike/BrotliCompress +++ b/BaseTools/BinWrappers/PosixLike/BrotliCompress @@ -11,32 +11,43 @@ # THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, # WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. # -LVL="--quality 9" +QLT="-q 9" +INPUTFLAG=0 while [ $# != 0 ];do case $1 in -d) - ARGS+="--decompress " + INPUTFLAG=1 + ARGS+="$1 " ;; -e) + INPUTFLAG=1 ;; -g) - ARGS+="--gap $2 " + ARGS+="$1 $2 " shift ;; - -l) - LVL="--quality $2 " + -o) + ARGS+="$1 $2 " shift ;; - -o) - ARGS+="--output $2 " + -q) + QLT="$1 $2 " shift ;; *) - ARGS+="--input $1 " + if [ $INPUTFLAG -eq 1 ] + then + if [ -z $2 ] + then + ARGS+="$QLT -i $1 " + break; + fi + fi + ARGS+="$1 " esac shift done -exec Brotli $ARGS $LVL +exec Brotli $ARGS |