From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id DE569158018 for ; Sun, 3 Oct 2021 04:01:12 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id C0DB5E0858; Sun, 3 Oct 2021 04:01:10 +0000 (UTC) Received: from smtp.gentoo.org (woodpecker.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher ECDHE-RSA-CHACHA20-POLY1305 (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 8C9FBE0858 for ; Sun, 3 Oct 2021 04:01:10 +0000 (UTC) Received: from oystercatcher.gentoo.org (unknown [IPv6:2a01:4f8:202:4333:225:90ff:fed9:fc84]) (using TLSv1.2 with cipher ECDHE-RSA-CHACHA20-POLY1305 (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 3CAED342E0D for ; Sun, 3 Oct 2021 04:01:09 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id A582F12A for ; Sun, 3 Oct 2021 04:01:07 +0000 (UTC) From: "Mike Frysinger" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Mike Frysinger" Message-ID: <1633228187.f6affac471ca772f43441e25bc2420bb49293f81.vapier@gentoo> Subject: [gentoo-commits] proj/build-docbook-catalog:master commit in: / X-VCS-Repository: proj/build-docbook-catalog X-VCS-Files: build-docbook-catalog X-VCS-Directories: / X-VCS-Committer: vapier X-VCS-Committer-Name: Mike Frysinger X-VCS-Revision: f6affac471ca772f43441e25bc2420bb49293f81 X-VCS-Branch: master Date: Sun, 3 Oct 2021 04:01:07 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: 8f2bb6a5-f6bd-4df4-a81b-533e095e23a2 X-Archives-Hash: 16a3d8a31b3e8d50e48e9a1dec6ac6a6 commit: f6affac471ca772f43441e25bc2420bb49293f81 Author: Mike Frysinger gentoo org> AuthorDate: Sun Oct 3 02:29:47 2021 +0000 Commit: Mike Frysinger gentoo org> CommitDate: Sun Oct 3 02:29:47 2021 +0000 URL: https://gitweb.gentoo.org/proj/build-docbook-catalog.git/commit/?id=f6affac4 do not try to lint missing files This avoids spurious warnings of corruption when the files don't exist. Signed-off-by: Mike Frysinger gentoo.org> build-docbook-catalog | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/build-docbook-catalog b/build-docbook-catalog index b4d7223..0da432a 100755 --- a/build-docbook-catalog +++ b/build-docbook-catalog @@ -161,7 +161,7 @@ create_catalogs() { local adds # Initialize catalogs if they don't exist or are corrupt. - if ! xmllint "${ROOT}${ROOTCATALOG}" >&/dev/null ; then + if [[ -r ${ROOT}${ROOTCATALOG} ]] && ! xmllint "${ROOT}${ROOTCATALOG}" >&/dev/null ; then rm -f "${ROOTCATALOG}" echo "Deleting corrupt ${ROOT}${ROOTCATALOG} and starting over" fi @@ -179,7 +179,7 @@ create_catalogs() { fi # Initialize catalogs if they don't exist or are corrupt. - if ! xmllint "${ROOT}${CATALOG}" >&/dev/null ; then + if [[ -r ${ROOT}${CATALOG} ]] && ! xmllint "${ROOT}${CATALOG}" >&/dev/null ; then rm -f "${ROOT}${CATALOG}" echo "Deleting corrupt ${CATALOG} and starting over" fi