Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp36918ybi; Wed, 29 May 2019 16:11:40 -0700 (PDT) X-Google-Smtp-Source: APXvYqxDmPndfNR53ksy7aqdpuLFU7Mmhzkf+xJjzljDPNFRrA3Gz0Ms5d8ksPKKf9BDnO0LZOB9 X-Received: by 2002:a17:90a:cf83:: with SMTP id i3mr252268pju.71.1559171500653; Wed, 29 May 2019 16:11:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1559171500; cv=none; d=google.com; s=arc-20160816; b=x9l2MiduXq9pp53LKsnji4MJsJR8JgGQd/ZvkIQsLWZaDSQKRDJaCioAiMHl9mgScd 9N0/i2zAFbx4SoyeJsIX3YtW7viZ0eQYxhnqem4zpDBtQwuU/1cGTUqFMsy41SCt3Qag ANvF/ZNB1Nwc3c4bsTbxK/HsBSGLv3qIldvISAzQCL+c17IE0WWPD8pbwQ8pJ/0vf93o ZNew/DhnDiLBtyk5OJMYkVuNH/CFOQ3DNAk1cK1Ax5mXnXmH+9AB8lHZVlt9UNvO66+a GbYDuuiNVXywOwTnLFHp/YYqTjgV0P4WRclk87SGd7B5NcYP+15GHsLwpyWxlU2fFHJW sdgA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=M5AYSXE7Y2LngfbsJ/DojP/iVd7EdymmZUqfay+8Wow=; b=evaSwR4/8a6UiJmvR6Tepiz7rPmsGfiphTAgOlpRAQ1NgMkldPO8Xty++UtIAP6AGF uOPjiEGozR1a3/8VH300pPkNdDhNy4JOybBOuBBpFivqZKfozYoEqJiNpovpCOXP3kx3 3aCfJhFGhCAzb0vv1cZ/tYvvTqbhqCWTb03zoyRqaM2p5yyk5ddeevBAskKMbCgXqfLu NGlRcZ7nUs9FvkBq6bpPxpZxQFTZsOAuqb65hhPWcougey2vv31flodAqNWYQaOG49le OWqF4Md21LjpiBArFlafrvmU6CNlOgsXHJ0DCuqaShYiYrUeojKAZVjM8dzjEAScoH2X LaDw== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=StuhuTjh; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id c1si1209932pla.122.2019.05.29.16.11.24; Wed, 29 May 2019 16:11:40 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=StuhuTjh; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726806AbfE2XJm (ORCPT + 99 others); Wed, 29 May 2019 19:09:42 -0400 Received: from bombadil.infradead.org ([198.137.202.133]:47600 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726489AbfE2XJh (ORCPT ); Wed, 29 May 2019 19:09:37 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20170209; h=Sender:Content-Transfer-Encoding: MIME-Version:References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From: Reply-To:Content-Type: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=M5AYSXE7Y2LngfbsJ/DojP/iVd7EdymmZUqfay+8Wow=; b=StuhuTjhMvOAiFhs0ch3NTd6a8 BLQGgL1+v4o0HI5fPhs2RB4p2QfnHl1k4QGhBmCxFH32mla5jWly+9Xw+Dqrh6J/Lk5yKr+d8MJ/v ZYYXNBG0nx2RHI7lnKJmgUMEYGAhJ2L5zbkn8NlT1vi6j4UTchxCg0lHbejRCbIxmByvzsrjBsfTY bp+ByvZIVquF3ynm8kuAw8YkaRZdA5iZWuhry0WkTzV9nSUmbsy9PbuwzVMA/+z6DW2i3wxQ0Kquu blWsap7mGUzTx3d5Q4I4haqkKFDWmCFJ97wD1EFZ7ef2gOkkicqhgdjvufljS7bbStkiM4RSlVyQA IrfU28bQ==; Received: from 177.132.232.81.dynamic.adsl.gvt.net.br ([177.132.232.81] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtpsa (Exim 4.90_1 #2 (Red Hat Linux)) id 1hW7hQ-0000lD-Go; Wed, 29 May 2019 23:09:36 +0000 Received: from mchehab by bombadil.infradead.org with local (Exim 4.92) (envelope-from ) id 1hW7hN-0007TZ-Kz; Wed, 29 May 2019 20:09:33 -0300 From: Mauro Carvalho Chehab To: Linux Doc Mailing List Cc: Mauro Carvalho Chehab , Mauro Carvalho Chehab , linux-kernel@vger.kernel.org, Jonathan Corbet Subject: [PATCH 05/10] scripts/documentation-file-ref-check: better handle translations Date: Wed, 29 May 2019 20:09:27 -0300 Message-Id: <0f7e9a81fccac06225a2a8277957c99d7678d9e6.1559170790.git.mchehab+samsung@kernel.org> X-Mailer: git-send-email 2.21.0 In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Only seek for translation renames inside the translation directory. Signed-off-by: Mauro Carvalho Chehab --- scripts/documentation-file-ref-check | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/scripts/documentation-file-ref-check b/scripts/documentation-file-ref-check index 63e9542656f1..6b622b88f4cf 100755 --- a/scripts/documentation-file-ref-check +++ b/scripts/documentation-file-ref-check @@ -141,6 +141,10 @@ print "Auto-fixing broken references. Please double-check the results\n"; foreach my $ref (keys %broken_ref) { my $new =$ref; + my $basedir = "."; + # On translations, only seek inside the translations directory + $basedir = $1 if ($ref =~ m,(Documentation/translations/[^/]+),); + # get just the basename $new =~ s,.*/,,; @@ -161,18 +165,18 @@ foreach my $ref (keys %broken_ref) { # usual reason for breakage: file renamed to .rst if (!$f) { $new =~ s/\.txt$/.rst/; - $f=qx(find . -iname $new) if ($new); + $f=qx(find $basedir -iname $new) if ($new); } # usual reason for breakage: use dash or underline if (!$f) { $new =~ s/[-_]/[-_]/g; - $f=qx(find . -iname $new) if ($new); + $f=qx(find $basedir -iname $new) if ($new); } # Wild guess: seek for the same name on another place if (!$f) { - $f = qx(find . -iname $new) if ($new); + $f = qx(find $basedir -iname $new) if ($new); } my @find = split /\s+/, $f; -- 2.21.0