summaryrefslogtreecommitdiff
path: root/BaseTools
diff options
context:
space:
mode:
authorSong, BinX <binx.song@intel.com>2017-04-13 14:40:30 +0800
committerGuo Mang <mang.guo@intel.com>2017-07-12 11:24:39 +0800
commit34a17f7ebfd043b5a927404046c85e2eac5b03f4 (patch)
treeae88ab2b969e2b64bb110c067d6f07b102ddb638 /BaseTools
parent54534525bb5da20fe0336110157fe61b8966bb74 (diff)
downloadedk2-platforms-34a17f7ebfd043b5a927404046c85e2eac5b03f4.tar.xz
BaseTools: Sync BrotliCompress script the same style
- Sync BrotliCompress script the same style with BrotliCompress.bat Cc: Liming Gao <liming.gao@intel.com> Cc: Yonghong Zhu <yonghong.zhu@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Bell Song <binx.song@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com> (cherry picked from commit 8ee193e898854e27a676ebddb775188e20882a9f)
Diffstat (limited to 'BaseTools')
-rwxr-xr-xBaseTools/BinWrappers/PosixLike/BrotliCompress55
1 files changed, 32 insertions, 23 deletions
diff --git a/BaseTools/BinWrappers/PosixLike/BrotliCompress b/BaseTools/BinWrappers/PosixLike/BrotliCompress
index 49358b2329..ca32d6a55c 100755
--- a/BaseTools/BinWrappers/PosixLike/BrotliCompress
+++ b/BaseTools/BinWrappers/PosixLike/BrotliCompress
@@ -14,39 +14,48 @@
QLT="-q 9"
INPUTFLAG=0
-while [ $# != 0 ];do
- case $1 in
- -d)
+for arg; do
+ if [ $1 = -d ]
+ then
INPUTFLAG=1
- ARGS+="$1 "
- ;;
- -e)
+ fi
+ if [ $1 = -e ]
+ then
INPUTFLAG=1
- ;;
- -g)
+ shift
+ continue;
+ fi
+ if [ $1 = -g ]
+ then
ARGS+="$1 $2 "
shift
- ;;
- -o)
+ shift
+ continue;
+ fi
+ if [ $1 = -o ]
+ then
ARGS+="$1 $2 "
shift
- ;;
- -q)
+ shift
+ continue;
+ fi
+ if [ $1 = -q ]
+ then
QLT="$1 $2 "
shift
- ;;
- *)
- if [ $INPUTFLAG -eq 1 ]
- then
- if [ -z $2 ]
- then
- ARGS+="$QLT -i $1 "
- break;
- fi
+ shift
+ continue;
+ fi
+ if [ $INPUTFLAG -eq 1 ]
+ then
+ if [ -z $2 ]
+ then
+ ARGS+="$QLT -i $1 "
+ break;
fi
- ARGS+="$1 "
- esac
+ fi
+ARGS+="$1 "
shift
done