aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2021-10-02 22:29:47 -0400
committerMike Frysinger <vapier@gentoo.org>2021-10-02 22:29:47 -0400
commitf6affac471ca772f43441e25bc2420bb49293f81 (patch)
tree01792fc132df631b9bd58d97aa40637e57a516c1
parentswitch locking to flock (diff)
downloadbuild-docbook-catalog-f6affac471ca772f43441e25bc2420bb49293f81.tar.gz
build-docbook-catalog-f6affac471ca772f43441e25bc2420bb49293f81.tar.bz2
build-docbook-catalog-f6affac471ca772f43441e25bc2420bb49293f81.zip
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@gentoo.org>
-rwxr-xr-xbuild-docbook-catalog4
1 files 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