commit: f6affac471ca772f43441e25bc2420bb49293f81
Author: Mike Frysinger <vapier <AT> gentoo <DOT> org>
AuthorDate: Sun Oct 3 02:29:47 2021 +0000
Commit: Mike Frysinger <vapier <AT> gentoo <DOT> 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 <vapier <AT> 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