aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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