]> git.proxmox.com Git - mirror_edk2.git/blob - BaseTools/BinWrappers/PosixLike/BrotliCompress
49358b232984b777eb854535267eb6deae895ca0
[mirror_edk2.git] / BaseTools / BinWrappers / PosixLike / BrotliCompress
1 #!/usr/bin/env bash
2 #
3 # This script will exec Brotli tool.
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
17 while [ $# != 0 ];do
18 case $1 in
19 -d)
20 INPUTFLAG=1
21 ARGS+="$1 "
22 ;;
23 -e)
24 INPUTFLAG=1
25 ;;
26 -g)
27 ARGS+="$1 $2 "
28 shift
29 ;;
30 -o)
31 ARGS+="$1 $2 "
32 shift
33 ;;
34 -q)
35 QLT="$1 $2 "
36 shift
37 ;;
38 *)
39 if [ $INPUTFLAG -eq 1 ]
40 then
41 if [ -z $2 ]
42 then
43 ARGS+="$QLT -i $1 "
44 break;
45 fi
46 fi
47 ARGS+="$1 "
48 esac
49
50 shift
51 done
52
53 exec Brotli $ARGS