public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: "Song, BinX" <binx.song@intel.com>
To: "edk2-devel@lists.01.org" <edk2-devel@lists.01.org>
Cc: "Gao, Liming" <liming.gao@intel.com>,
	"Zhu, Yonghong" <yonghong.zhu@intel.com>
Subject: [PATCH] BaseTools: Sync BrotliCompress script the same style
Date: Thu, 13 Apr 2017 06:40:30 +0000	[thread overview]
Message-ID: <559D2DF22BC9A3468B4FA1AA547F0EF10255B78C@shsmsx102.ccr.corp.intel.com> (raw)

- 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>
---
 BaseTools/BinWrappers/PosixLike/BrotliCompress | 55 +++++++++++++++-----------
 1 file changed, 32 insertions(+), 23 deletions(-)

diff --git a/BaseTools/BinWrappers/PosixLike/BrotliCompress b/BaseTools/BinWrappers/PosixLike/BrotliCompress
index 49358b2..ca32d6a 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
 
-- 
2.10.2.windows.1



                 reply	other threads:[~2017-04-13  6:40 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-list from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=559D2DF22BC9A3468B4FA1AA547F0EF10255B78C@shsmsx102.ccr.corp.intel.com \
    --to=devel@edk2.groups.io \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox