]>
Commit | Line | Data |
---|---|---|
de87f232 SB |
1 | #!/usr/bin/env bash |
2 | # | |
83e901a5 | 3 | # This script will exec Brotli tool with -e/-d options. |
de87f232 SB |
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 | |
83e901a5 | 16 | ARGS= |
de87f232 | 17 | |
83e901a5 LG |
18 | while test $# -gt 0 |
19 | do | |
20 | case $1 in | |
21 | -e) | |
98cb4684 | 22 | INPUTFLAG=1 |
83e901a5 LG |
23 | ;; |
24 | -d) | |
98cb4684 | 25 | INPUTFLAG=1 |
83e901a5 LG |
26 | ARGS+="$1 " |
27 | ;; | |
28 | -o|-g) | |
98cb4684 | 29 | ARGS+="$1 $2 " |
de87f232 | 30 | shift |
83e901a5 LG |
31 | ;; |
32 | -q) | |
98cb4684 | 33 | QLT="$1 $2 " |
de87f232 | 34 | shift |
83e901a5 LG |
35 | ;; |
36 | *) | |
37 | if [ $INPUTFLAG -eq 1 ] | |
8ee193e8 | 38 | then |
83e901a5 LG |
39 | ARGS+="-i $1 " |
40 | INPUTFLAG=0 | |
41 | else | |
42 | ARGS+="$1 " | |
98cb4684 | 43 | fi |
83e901a5 LG |
44 | ;; |
45 | esac | |
46 | shift | |
de87f232 SB |
47 | done |
48 | ||
83e901a5 | 49 | exec Brotli $ARGS $QLT |