]> git.proxmox.com Git - mirror_edk2.git/blame - BaseTools/BinWrappers/PosixLike/BrotliCompress
BaseTools: Treat Ecc.py as a python module
[mirror_edk2.git] / BaseTools / BinWrappers / PosixLike / BrotliCompress
CommitLineData
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
14QLT="-q 9"
15INPUTFLAG=0
83e901a5 16ARGS=
de87f232 17
83e901a5
LG
18while test $# -gt 0
19do
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
47done
48
83e901a5 49exec Brotli $ARGS $QLT