From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754662AbbGJLvx (ORCPT ); Fri, 10 Jul 2015 07:51:53 -0400 Received: from smtprelay0167.hostedemail.com ([216.40.44.167]:51655 "EHLO smtprelay.hostedemail.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1753080AbbGJLvo (ORCPT ); Fri, 10 Jul 2015 07:51:44 -0400 X-Session-Marker: 6A6F6540706572636865732E636F6D X-Spam-Summary: 2,0,0,,d41d8cd98f00b204,joe@perches.com,:::::,RULES_HIT:41:355:379:541:599:982:988:989:1260:1277:1311:1313:1314:1345:1359:1373:1437:1515:1516:1518:1534:1539:1593:1594:1711:1730:1747:1777:1792:2393:2559:2562:2828:3138:3139:3140:3141:3142:3352:3622:3653:3866:3871:4321:5007:6119:6261:7875:10004:10400:10848:11232:11658:11914:12043:12517:12519:12555:12740:13019:13069:13311:13357:21080,0,RBL:none,CacheIP:none,Bayesian:0.5,0.5,0.5,Netcheck:none,DomainCache:0,MSF:not bulk,SPF:fn,MSBL:0,DNSBL:none,Custom_rules:0:0:0 X-HE-Tag: cakes85_ef354b6cea59 X-Filterd-Recvd-Size: 1485 Message-ID: <1436529101.24866.39.camel@perches.com> Subject: Re: [PATCH] Lindent: Handle missing indent gracefully From: Joe Perches To: Jean Delvare Cc: LKML , Andrew Morton Date: Fri, 10 Jul 2015 04:51:41 -0700 In-Reply-To: <20150710134751.624de706@endymion.delvare> References: <20150710134751.624de706@endymion.delvare> Content-Type: text/plain; charset="ISO-8859-1" X-Mailer: Evolution 3.12.11-0ubuntu3 Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, 2015-07-10 at 13:47 +0200, Jean Delvare wrote: > If indent is not found, bail out immediately instead of spitting > random shell script error messages. OK, but can't we just delete Lindent instead? > --- linux-4.2-rc0.orig/scripts/Lindent 2015-06-22 07:05:43.000000000 +0200 > +++ linux-4.2-rc0/scripts/Lindent 2015-07-10 13:45:56.864031472 +0200 > @@ -1,6 +1,9 @@ > #!/bin/sh > PARAM="-npro -kr -i8 -ts8 -sob -l80 -ss -ncs -cp1" > RES=`indent --version` > +if [ "$RES" = "" ]; then > + exit 1 > +fi > V1=`echo $RES | cut -d' ' -f3 | cut -d'.' -f1` > V2=`echo $RES | cut -d' ' -f3 | cut -d'.' -f2` > V3=`echo $RES | cut -d' ' -f3 | cut -d'.' -f3` >