From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 95254A04C1; Wed, 20 Nov 2019 12:51:00 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 5C71B2E8F; Wed, 20 Nov 2019 12:51:00 +0100 (CET) Received: from mga12.intel.com (mga12.intel.com [192.55.52.136]) by dpdk.org (Postfix) with ESMTP id 38BC827D for ; Wed, 20 Nov 2019 12:50:58 +0100 (CET) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by fmsmga106.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 20 Nov 2019 03:50:57 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.69,221,1571727600"; d="scan'208";a="231900980" Received: from aburakov-mobl1.ger.corp.intel.com (HELO [10.237.220.92]) ([10.237.220.92]) by fmsmga004.fm.intel.com with ESMTP; 20 Nov 2019 03:50:56 -0800 To: Thomas Monjalon Cc: dev@dpdk.org, john.mcnamara@intel.com, ray.kinsella@intel.com, bruce.richardson@intel.com, david.marchand@redhat.com References: <8286083.4ZIB1RLW8s@xps> From: "Burakov, Anatoly" Message-ID: Date: Wed, 20 Nov 2019 11:50:55 +0000 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:60.0) Gecko/20100101 Thunderbird/60.9.0 MIME-Version: 1.0 In-Reply-To: <8286083.4ZIB1RLW8s@xps> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Subject: Re: [dpdk-dev] [PATCH v7 03/10] buildtools: add ABI update shell script X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" On 19-Nov-19 5:38 PM, Thomas Monjalon wrote: > 08/11/2019 17:25, Anatoly Burakov: >> In order to facilitate mass updating of version files, add a shell >> script that recurses into lib/ and drivers/ directories and calls >> the ABI version update script. >> >> Signed-off-by: Anatoly Burakov >> Acked-by: Bruce Richardson >> --- /dev/null >> +++ b/buildtools/update-abi.sh >> @@ -0,0 +1,42 @@ >> +#!/bin/sh > > For such script, I think -e is mandatory, so we do not miss any error. > It would just require merge following check in the "if": > As was discussed on IRC, i'm fine with -e added to shebang, but i don't like if statements that take half of my monitor :) I would rather put it into a function. I just tested it: ``` #!/bin/sh -e func() { false } if [ !func ]; then echo "Error" fi func echo "This is never reached" ``` This outputs "Error". So i think i'll go ahead and make it into a function. This would still leave the code readable, *and* satisfy the "#!/bin/sh -e" shebang requirement :) -- Thanks, Anatoly