From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <thomas.monjalon@6wind.com>
Received: from mail-wm0-f50.google.com (mail-wm0-f50.google.com [74.125.82.50])
 by dpdk.org (Postfix) with ESMTP id 831D66CBD
 for <dev@dpdk.org>; Wed,  6 Jul 2016 15:15:30 +0200 (CEST)
Received: by mail-wm0-f50.google.com with SMTP id z126so111335743wme.0
 for <dev@dpdk.org>; Wed, 06 Jul 2016 06:15:30 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=6wind-com.20150623.gappssmtp.com; s=20150623;
 h=from:to:cc:subject:date:message-id:user-agent:in-reply-to
 :references:mime-version:content-transfer-encoding;
 bh=3Lhu0ATWkuheSAEg25Hkw6dXNdg6r/FAoI/GJrAgdgw=;
 b=Yx9qHJUe5Hk+XiPs2xgo1yRx2Qf2ksSzZ9K4G3+f/a8jFTVNVSDW5Uf+aoVG0r2/yZ
 x+szeFePa3J2gFzSSufbzEyjPsrtFQAqYqN6If1F0K3DVrkE5KUBR91XoviYi/KWuWCu
 Xz8OL99UWjEXhW15k2SK7NpJOPHRtMKxb0FIF3swRGCAu5pS203FqNw0nhO7aNSx8I/d
 yBtLbXZ6hi9qbOgdykCl8ymltDW82O8nfuo9aLkYNLGXvmv26CtQhMyXvaRyj18gqst9
 GINevbQlZxf+gsz4r3bZhm1OBF97OolnqLaeMCfyJsP8wiYyXKSfMH5n2zKsH5AFpnne
 zssg==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20130820;
 h=x-gm-message-state:from:to:cc:subject:date:message-id:user-agent
 :in-reply-to:references:mime-version:content-transfer-encoding;
 bh=3Lhu0ATWkuheSAEg25Hkw6dXNdg6r/FAoI/GJrAgdgw=;
 b=QTaHfgtid3VDFAzMLKyQxqrhHO6ck5vt2lB5IsMieWzKOrL/6A/MjtHmQmOq7UZb5q
 I9JZh5MxmjixivJiup+zyzDghxKGbNz6n07rhmGOPjJOnPzgwA96P/RJu5wOFbKtKRn0
 yynahsy9RHqUDGpTzsJS445+HK2wGaFqjRIsyCrl3g2S+SzfeQqP+qs8O0rDPXqfxDTP
 nDYZSIEcoJ37QIVhKlDq5wFW+4GD6/v/7aO4patskURRrHcMHld5aK8MgG5yBccp5PKt
 6r3nUROHJqnBLACxALrK/F8wCMGnaxI58bqcYjreAnj0LGLAR3JqknCAqJiJiHJFY2SG
 AEbg==
X-Gm-Message-State: ALyK8tIOyjFU5nHh0p3jD/19MDKY9w/x+/nckUC7aJpJ8JEJaGRHxI9m1n4XztVrfpw4gPL1
X-Received: by 10.28.87.20 with SMTP id l20mr22654767wmb.1.1467810930248;
 Wed, 06 Jul 2016 06:15:30 -0700 (PDT)
Received: from xps13.localnet (184.203.134.77.rev.sfr.net. [77.134.203.184])
 by smtp.gmail.com with ESMTPSA id z5sm400257wme.5.2016.07.06.06.15.29
 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);
 Wed, 06 Jul 2016 06:15:29 -0700 (PDT)
From: Thomas Monjalon <thomas.monjalon@6wind.com>
To: =?ISO-8859-1?Q?N=E9lio?= Laranjeiro <nelio.laranjeiro@6wind.com>
Cc: dev@dpdk.org
Date: Wed, 06 Jul 2016 15:15:28 +0200
Message-ID: <1575942.agmeWBiVAh@xps13>
User-Agent: KMail/4.14.10 (Linux/4.5.4-1-ARCH; KDE/4.14.11; x86_64; ; )
In-Reply-To: <20160706115927.GE14792@autoinstall.dev.6wind.com>
References: <1467801530-20800-1-git-send-email-thomas.monjalon@6wind.com>
 <1467801530-20800-4-git-send-email-thomas.monjalon@6wind.com>
 <20160706115927.GE14792@autoinstall.dev.6wind.com>
MIME-Version: 1.0
Content-Transfer-Encoding: quoted-printable
Content-Type: text/plain; charset="iso-8859-1"
Subject: Re: [dpdk-dev] [PATCH 3/3] scripts: check headline of drivers
	commits
X-BeenThere: dev@dpdk.org
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: patches and discussions about DPDK <dev.dpdk.org>
List-Unsubscribe: <http://dpdk.org/ml/options/dev>,
 <mailto:dev-request@dpdk.org?subject=unsubscribe>
List-Archive: <http://dpdk.org/ml/archives/dev/>
List-Post: <mailto:dev@dpdk.org>
List-Help: <mailto:dev-request@dpdk.org?subject=help>
List-Subscribe: <http://dpdk.org/ml/listinfo/dev>,
 <mailto:dev-request@dpdk.org?subject=subscribe>
X-List-Received-Date: Wed, 06 Jul 2016 13:15:30 -0000

2016-07-06 13:59, N=E9lio Laranjeiro:
> > +# check headline prefix when touching only drivers/, e.g. net/<dri=
ver name>
> > +bad=3D$(for commit in $commits ; do
> > +=09headline=3D$(git log --format=3D'%s' -1 $commit)
> > +=09files=3D$(git diff-tree --no-commit-id --name-only -r $commit)
> > +=09[ -z "$(echo "$files" | grep -v '^drivers/')" ] || continue
> > +=09driversgrp=3D$(echo "$files" | cut -d "/" -f 2 | sort -u)
> > +=09drivers=3D$(echo "$files" | cut -d "/" -f 2,3 | sort -u)
> > +=09if [ $(echo "$driversgrp" | wc -l) -gt 1 ] ; then
> > +=09=09bad=3D$(echo "$headline" | grep -v '^drivers:')
>=20
> I think you forgot the '$' for drivers in the line just above.

No it is a plain "drivers:" for cases where we have net and crypto.
(it is an addition from your original idea)
But I forgot to remove bad=3D$( which I've moved to the first line.

> > +=09elif [ $(echo "$drivers" | wc -l) -gt 1 ] ; then
> > +=09=09bad=3D$(echo "$headline" | grep -v "^$driversgrp")
> > +=09else
> > +=09=09bad=3D$(echo "$headline" | grep -v "^$drivers")
> > +=09fi
> > +done | sed 's,^,\t,')
> > +[ -z "$bad" ] || printf "Wrong headline prefix:\n$bad\n"
>=20
> Otherwise it seems good.

V2 on going