From patchwork Thu Aug 15 17:11:58 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lars Kurth X-Patchwork-Id: 11096177 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id C8F6B112C for ; Thu, 15 Aug 2019 17:14:34 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id BA967286BF for ; Thu, 15 Aug 2019 17:14:34 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id AEBA7286EE; Thu, 15 Aug 2019 17:14:34 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 15602288F7 for ; Thu, 15 Aug 2019 17:14:32 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1hyJIR-00058a-Pi; Thu, 15 Aug 2019 17:12:19 +0000 Received: from us1-rack-iad1.inumbo.com ([172.99.69.81]) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1hyJIQ-00058V-Mm for xen-devel@lists.xenproject.org; Thu, 15 Aug 2019 17:12:18 +0000 X-Inumbo-ID: d5768914-bf7f-11e9-b90c-bc764e2007e4 Received: from mail.xenproject.org (unknown [104.130.215.37]) by us1-rack-iad1.inumbo.com (Halon) with ESMTPS id d5768914-bf7f-11e9-b90c-bc764e2007e4; Thu, 15 Aug 2019 17:12:17 +0000 (UTC) Received: from xenbits.xenproject.org ([104.239.192.120]) by mail.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1hyJIO-00044F-2I; Thu, 15 Aug 2019 17:12:16 +0000 Received: from localhost ([127.0.0.1] helo=localhost.localdomain) by xenbits.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1hyJIN-0007ak-Qs; Thu, 15 Aug 2019 17:12:15 +0000 From: Lars Kurth To: xen-devel@lists.xenproject.org Date: Thu, 15 Aug 2019 18:11:58 +0100 Message-Id: <20190815171158.33884-1-lars.kurth@citrix.com> X-Mailer: git-send-email 2.13.0 Subject: [Xen-devel] [PATCH] Allow get_maintainer.pl / add_maintainers.pl scripts to be called outside of xen.git X-BeenThere: xen-devel@lists.xenproject.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Cc: Lars Kurth , Stefano Stabellini , Wei Liu , Konrad Rzeszutek Wilk , George Dunlap , Andrew Cooper , Ian Jackson , Tim Deegan , Julien Grall , Jan Beulich MIME-Version: 1.0 Errors-To: xen-devel-bounces@lists.xenproject.org Sender: "Xen-devel" X-Virus-Scanned: ClamAV using ClamSMTP Use-case: Allow using both scripts on xen repositories such as mini-os.git, osstest.git, Tool changes: * add_maintainers.pl: $get_maintainer inherits path from $0 * get_maintainer.pl: warn (instead fo die) when called from a different tree Assumptions: the repository contains a MAINTAINERS file that follows the same conventions as the file in xen.git A suggested template ======================================================== This file follows the same conventions as outlined in xen.git:MAINTAINERS. Please refer to the file in xen.git for more information. THE REST M: MAINTAINER1 M: MAINTAINER2 L: xen-devel@lists.xenproject.org S: Supported F: */ ======================================================== Signed-off-by: Lars Kurth --- scripts/add_maintainers.pl | 9 ++++++--- scripts/get_maintainer.pl | 13 +++++++++++-- 2 files changed, 17 insertions(+), 5 deletions(-) diff --git a/scripts/add_maintainers.pl b/scripts/add_maintainers.pl index 09e9f6609f..7f98dde874 100755 --- a/scripts/add_maintainers.pl +++ b/scripts/add_maintainers.pl @@ -25,10 +25,13 @@ sub normalize ($$); sub insert ($$$$); sub hastag ($$); -# Tool Variables -my $get_maintainer = "./scripts/get_maintainer.pl"; - +# Tool Variables my $tool = $0; +my $get_maintainer = $tool; +$get_maintainer =~ s/add_maintainers/get_maintainer/; + +print $get_maintainer."\n"; + my $usage = <