]> git.proxmox.com Git - mirror_edk2.git/blob - BaseTools/BinWrappers/PosixLike/BrotliCompress
BaseTools: Sync BrotliCompress script the same style
[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 for arg; do
18 if [ $1 = -d ]
19 then
20 INPUTFLAG=1
21 fi
22 if [ $1 = -e ]
23 then
24 INPUTFLAG=1
25 shift
26 continue;
27 fi
28 if [ $1 = -g ]
29 then
30 ARGS+="$1 $2 "
31 shift
32 shift
33 continue;
34 fi
35 if [ $1 = -o ]
36 then
37 ARGS+="$1 $2 "
38 shift
39 shift
40 continue;
41 fi
42 if [ $1 = -q ]
43 then
44 QLT="$1 $2 "
45 shift
46 shift
47 continue;
48 fi
49 if [ $INPUTFLAG -eq 1 ]
50 then
51 if [ -z $2 ]
52 then
53 ARGS+="$QLT -i $1 "
54 break;
55 fi
56 fi
57
58 ARGS+="$1 "
59 shift
60 done
61
62 exec Brotli $ARGS