]> git.proxmox.com Git - mirror_edk2.git/blob - BaseTools/BinWrappers/PosixLike/BrotliCompress
BaseTools: Treat BPDG.py as a python module
[mirror_edk2.git] / BaseTools / BinWrappers / PosixLike / BrotliCompress
1 #!/usr/bin/env bash
2 #
3 # This script will exec Brotli tool with -e/-d options.
4 #
5 # Copyright (c) 2017, Intel Corporation. All rights reserved.<BR>
6 # This program and the accompanying materials
7 # are licensed and made available under the terms and conditions of the BSD License
8 # which accompanies this distribution. The full text of the license may be found at
9 # http://opensource.org/licenses/bsd-license.php
10 #
11 # THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
12 # WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
13 #
14 QLT="-q 9"
15 INPUTFLAG=0
16 ARGS=
17
18 while test $# -gt 0
19 do
20 case $1 in
21 -e)
22 INPUTFLAG=1
23 ;;
24 -d)
25 INPUTFLAG=1
26 ARGS+="$1 "
27 ;;
28 -o|-g)
29 ARGS+="$1 $2 "
30 shift
31 ;;
32 -q)
33 QLT="$1 $2 "
34 shift
35 ;;
36 *)
37 if [ $INPUTFLAG -eq 1 ]
38 then
39 ARGS+="-i $1 "
40 INPUTFLAG=0
41 else
42 ARGS+="$1 "
43 fi
44 ;;
45 esac
46 shift
47 done
48
49 exec Brotli $ARGS $QLT