]>
Commit | Line | Data |
---|---|---|
de87f232 SB |
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 | # | |
98cb4684 SB |
14 | QLT="-q 9" |
15 | INPUTFLAG=0 | |
de87f232 | 16 | |
8ee193e8 SB |
17 | for arg; do |
18 | if [ $1 = -d ] | |
19 | then | |
98cb4684 | 20 | INPUTFLAG=1 |
8ee193e8 SB |
21 | fi |
22 | if [ $1 = -e ] | |
23 | then | |
98cb4684 | 24 | INPUTFLAG=1 |
8ee193e8 SB |
25 | shift |
26 | continue; | |
27 | fi | |
28 | if [ $1 = -g ] | |
29 | then | |
98cb4684 | 30 | ARGS+="$1 $2 " |
de87f232 | 31 | shift |
8ee193e8 SB |
32 | shift |
33 | continue; | |
34 | fi | |
35 | if [ $1 = -o ] | |
36 | then | |
98cb4684 | 37 | ARGS+="$1 $2 " |
de87f232 | 38 | shift |
8ee193e8 SB |
39 | shift |
40 | continue; | |
41 | fi | |
42 | if [ $1 = -q ] | |
43 | then | |
98cb4684 | 44 | QLT="$1 $2 " |
de87f232 | 45 | shift |
8ee193e8 SB |
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; | |
98cb4684 | 55 | fi |
8ee193e8 | 56 | fi |
de87f232 | 57 | |
8ee193e8 | 58 | ARGS+="$1 " |
de87f232 SB |
59 | shift |
60 | done | |
61 | ||
98cb4684 | 62 | exec Brotli $ARGS |