Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.1 required=3.0 tests=DKIM_INVALID,DKIM_SIGNED, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id DBA24C433DF for ; Tue, 19 May 2020 08:58:50 +0000 (UTC) Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id AC3102088E for ; Tue, 19 May 2020 08:58:50 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (1024-bit key) header.d=xen.org header.i=@xen.org header.b="EmBoUSjM" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org AC3102088E Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=xen.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=xen-devel-bounces@lists.xenproject.org Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1jay4q-0007Ek-MI; Tue, 19 May 2020 08:58:20 +0000 Received: from us1-rack-iad1.inumbo.com ([172.99.69.81]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1jay4p-0007Ee-92 for xen-devel@lists.xenproject.org; Tue, 19 May 2020 08:58:19 +0000 X-Inumbo-ID: e2392558-99ae-11ea-b9cf-bc764e2007e4 Received: from mail.xenproject.org (unknown [104.130.215.37]) by us1-rack-iad1.inumbo.com (Halon) with ESMTPS id e2392558-99ae-11ea-b9cf-bc764e2007e4; Tue, 19 May 2020 08:58:18 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org; s=20200302mail; h=In-Reply-To:Content-Type:MIME-Version:References:Message-ID :Subject:Cc:To:From:Date:Sender:Reply-To:Content-Transfer-Encoding:Content-ID :Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To: Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe :List-Post:List-Owner:List-Archive; bh=7+z3ZDCgN11RO4REgESRXkZ917HXpAqJ50OIrMd4lfM=; b=EmBoUSjMIrfbsRkobjDHQgoLRD YfT5K/X1JL45cFeAC6mm2Ux9KVNTBBQvit8XsdBoW5D2pF8Fc0AV6eMRmJ9ia86i8skN8NKRwyPFn 5ACE1Ag9U5gcVjx5IzjqXJVfPZusa1Di2QvtWbFk8BsMZjj571bp5lkB42RR26uSg4UI=; Received: from xenbits.xenproject.org ([104.239.192.120]) by mail.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1jay4o-0003qL-1A; Tue, 19 May 2020 08:58:18 +0000 Received: from 96.142.6.51.dyn.plus.net ([51.6.142.96] helo=debian) by xenbits.xenproject.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1jay4n-0004tu-Nc; Tue, 19 May 2020 08:58:17 +0000 Date: Tue, 19 May 2020 09:58:15 +0100 From: Wei Liu To: Anthony PERARD Subject: Re: [XEN PATCH 1/2] tools/python: Fix install-wrap Message-ID: <20200519085815.nswits7owiutn3nc@debian> References: <20200311175933.1362235-1-anthony.perard@citrix.com> <20200311175933.1362235-2-anthony.perard@citrix.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200311175933.1362235-2-anthony.perard@citrix.com> User-Agent: NeoMutt/20180716 X-BeenThere: xen-devel@lists.xenproject.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Cc: xen-devel@lists.xenproject.org, Ian Jackson , Marek =?utf-8?Q?Marczykowski-G=C3=B3recki?= , Wei Liu Errors-To: xen-devel-bounces@lists.xenproject.org Sender: "Xen-devel" On Wed, Mar 11, 2020 at 05:59:32PM +0000, Anthony PERARD wrote: > This allows to use install-wrap when the source scripts is in a > subdirectory. > > Signed-off-by: Anthony PERARD > --- > tools/python/install-wrap | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/tools/python/install-wrap b/tools/python/install-wrap > index 00e2014016f9..fef24e01708d 100755 > --- a/tools/python/install-wrap > +++ b/tools/python/install-wrap > @@ -44,7 +44,7 @@ shift > destf="$dest" > for srcf in ${srcs}; do > if test -d "$dest"; then > - destf="$dest/${srcf%%*/}" > + destf="$dest/${srcf##*/}" This seems to have changed the pattern from "Remove Largest Suffix" to "Remove Largest Prefix". What does it do in practice? For POSIX sh x=posix/src/std echo ${x%%*/} -> posix/src/std echo ${x##*/} -> std I would think the former is what you want. But I could be missing something obvious. Wei. > fi > org="$(sed -n '2q; /^#! *\/usr\/bin\/env python *$/p' $srcf)" > if test "x$org" = x; then > -- > Anthony PERARD >