From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id D7D8A2194EB5F for ; Wed, 12 Apr 2017 23:40:36 -0700 (PDT) Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by fmsmga102.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 12 Apr 2017 23:40:36 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.37,193,1488873600"; d="dat'59?scan'59,208,59";a="248068187" Received: from fmsmsx106.amr.corp.intel.com ([10.18.124.204]) by fmsmga004.fm.intel.com with ESMTP; 12 Apr 2017 23:40:36 -0700 Received: from fmsmsx114.amr.corp.intel.com (10.18.116.8) by FMSMSX106.amr.corp.intel.com (10.18.124.204) with Microsoft SMTP Server (TLS) id 14.3.319.2; Wed, 12 Apr 2017 23:40:34 -0700 Received: from shsmsx103.ccr.corp.intel.com (10.239.4.69) by FMSMSX114.amr.corp.intel.com (10.18.116.8) with Microsoft SMTP Server (TLS) id 14.3.319.2; Wed, 12 Apr 2017 23:40:33 -0700 Received: from shsmsx102.ccr.corp.intel.com ([169.254.2.246]) by SHSMSX103.ccr.corp.intel.com ([169.254.4.117]) with mapi id 14.03.0319.002; Thu, 13 Apr 2017 14:40:31 +0800 From: "Song, BinX" To: "edk2-devel@lists.01.org" CC: "Gao, Liming" , "Zhu, Yonghong" Thread-Topic: [PATCH] BaseTools: Sync BrotliCompress script the same style Thread-Index: AdK0INgau68FDpDeTBia/1o2cxEg9A== Date: Thu, 13 Apr 2017 06:40:30 +0000 Message-ID: <559D2DF22BC9A3468B4FA1AA547F0EF10255B78C@shsmsx102.ccr.corp.intel.com> Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: <559D2DF22BC9A3468B4FA1AA547F0EF10255B78C@shsmsx102.ccr.corp.intel.com> x-originating-ip: [10.239.127.40] MIME-Version: 1.0 X-Content-Filtered-By: Mailman/MimeDel 2.1.22 Subject: [PATCH] BaseTools: Sync BrotliCompress script the same style X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 13 Apr 2017 06:40:37 -0000 Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable - Sync BrotliCompress script the same style with BrotliCompress.bat Cc: Liming Gao Cc: Yonghong Zhu Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Bell Song --- BaseTools/BinWrappers/PosixLike/BrotliCompress | 55 +++++++++++++++-------= ---- 1 file changed, 32 insertions(+), 23 deletions(-) diff --git a/BaseTools/BinWrappers/PosixLike/BrotliCompress b/BaseTools/Bin= Wrappers/PosixLike/BrotliCompress index 49358b2..ca32d6a 100755 --- a/BaseTools/BinWrappers/PosixLike/BrotliCompress +++ b/BaseTools/BinWrappers/PosixLike/BrotliCompress @@ -14,39 +14,48 @@ QLT=3D"-q 9" INPUTFLAG=3D0 =20 -while [ $# !=3D 0 ];do - case $1 in - -d) +for arg; do + if [ $1 =3D -d ] + then INPUTFLAG=3D1 - ARGS+=3D"$1 " - ;; - -e) + fi + if [ $1 =3D -e ] + then INPUTFLAG=3D1 - ;; - -g) + shift + continue; + fi + if [ $1 =3D -g ] + then ARGS+=3D"$1 $2 " shift - ;; - -o) + shift + continue; + fi + if [ $1 =3D -o ] + then ARGS+=3D"$1 $2 " shift - ;; - -q) + shift + continue; + fi + if [ $1 =3D -q ] + then QLT=3D"$1 $2 " shift - ;; - *) - if [ $INPUTFLAG -eq 1 ] - then - if [ -z $2 ] - then - ARGS+=3D"$QLT -i $1 " - break; - fi + shift + continue; + fi + if [ $INPUTFLAG -eq 1 ] + then + if [ -z $2 ] + then + ARGS+=3D"$QLT -i $1 " + break; fi - ARGS+=3D"$1 " - esac + fi =20 +ARGS+=3D"$1 " shift done =20 --=20 2.10.2.windows.1