Received: by 2002:a17:90a:2044:0:0:0:0 with SMTP id n62csp523332pjc; Mon, 20 May 2019 11:13:06 -0700 (PDT) X-Google-Smtp-Source: APXvYqxIsDpT/paak6P1DdMyFS56ksAgh+Cd//Hjv2Yw3LGt9YxfhlJl9il1qlu2hGDjrSYCAPZ9 X-Received: by 2002:a17:902:108a:: with SMTP id c10mr77831343pla.48.1558375986097; Mon, 20 May 2019 11:13:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1558375986; cv=none; d=google.com; s=arc-20160816; b=DSUqcsPch838SWqZGrKBIesV4zAKOxeKzYBcdeJo15Kwy2hqbGa84l7EhICh0Gw+PF RVhBTFeZy/fwGG6Hevo9tHylW76oExzWwPt7aoqvp8waos1q8sZht+FelBSsSXPKVOOB N7/lkIw4MPZY+9fT/M2ucT0MzRGi+2NHQOa3V90K7NFvWdqaPihQHlffk64L07N+fotk OnM4gGIe1TrWe7A66IcKQ8wbEYvAzOgCBlthDsVLq37VC1i0G0NdOyFjLBgAkWqUfSu8 l8D7Ss6rUXlPkBnDLXB9qfzFAQmjCcth15Zd7wLZwLf0q28J2lgalAP1RJM55Wfvmqtb p9/Q== 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=t5ztqaykFL6cGAAuTmEalZJdR55R+8fEUIA4qnauueielCuyNOvVdSzwMFQuStQmNT 5FX0SNpLmVIqeGrBRYIQUTrTWdaF1hQMyY5gFsZ/CTlkuoyObnrqHW0kfOlOEcd4w+h9 NmgCHW4JPPJcipVUU2lGBhlXSsqA80g2V8v93LH67Vgv+5Q1/qzwkjIyQ8sgUbHMVeXC EbnebjP/ybJ/K+BEWSEfj3k/66BccV6LTNNWIEbRR3xQqwXTGEELC9CEm/kMcDgLr4VL gsaeChU3hIhYPywMrUuf7HmZpR+UbWx6LHm5N4/8WralTF494mabqZTbPfm/znAa7A5E mBFQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=TdU1BN1G; 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 w7si17958256pgr.399.2019.05.20.11.12.51; Mon, 20 May 2019 11:13:06 -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=TdU1BN1G; 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 S1730937AbfETOsQ (ORCPT + 99 others); Mon, 20 May 2019 10:48:16 -0400 Received: from bombadil.infradead.org ([198.137.202.133]:36560 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2388519AbfETOsP (ORCPT ); Mon, 20 May 2019 10:48:15 -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=TdU1BN1Gcd022p3TFE2CDrG8c+ l0Y1gZm2e+rk85dleVznTM8XTUlj1Mobek1VkEvS3KnIIATx1mXLy4xsbZmqfvS3mxxdCzOswvXjm U6URgJS+kyi9687r2RUq01vs3KVljynLfkUsMM2AuqyXKyZXxTuT5gs8Szx2znfbs1TrxqLjTPXba 1OOUeverfVJbZwmSM4bxj7oc95G7jZQbmF20DKqYwlsnb4etDZoLtU6O9IQNVADCAvvswALN/x4Wq 53j+1u5Qi745w9wGME/aEsraVx2L7V8vODwnicm53fdfUPDIdVi7F4Gk8hp9p/geYDiijwJoX9iBE EgbyJ74g==; Received: from 179.176.119.151.dynamic.adsl.gvt.net.br ([179.176.119.151] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtpsa (Exim 4.90_1 #2 (Red Hat Linux)) id 1hSjaH-0000aP-Gv; Mon, 20 May 2019 14:48:13 +0000 Received: from mchehab by bombadil.infradead.org with local (Exim 4.92) (envelope-from ) id 1hSjZo-00010e-V0; Mon, 20 May 2019 11:47:44 -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 01/10] scripts/documentation-file-ref-check: better handle translations Date: Mon, 20 May 2019 11:47:30 -0300 Message-Id: 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