1 |
commit: f6affac471ca772f43441e25bc2420bb49293f81 |
2 |
Author: Mike Frysinger <vapier <AT> gentoo <DOT> org> |
3 |
AuthorDate: Sun Oct 3 02:29:47 2021 +0000 |
4 |
Commit: Mike Frysinger <vapier <AT> gentoo <DOT> org> |
5 |
CommitDate: Sun Oct 3 02:29:47 2021 +0000 |
6 |
URL: https://gitweb.gentoo.org/proj/build-docbook-catalog.git/commit/?id=f6affac4 |
7 |
|
8 |
do not try to lint missing files |
9 |
|
10 |
This avoids spurious warnings of corruption when the files don't exist. |
11 |
|
12 |
Signed-off-by: Mike Frysinger <vapier <AT> gentoo.org> |
13 |
|
14 |
build-docbook-catalog | 4 ++-- |
15 |
1 file changed, 2 insertions(+), 2 deletions(-) |
16 |
|
17 |
diff --git a/build-docbook-catalog b/build-docbook-catalog |
18 |
index b4d7223..0da432a 100755 |
19 |
--- a/build-docbook-catalog |
20 |
+++ b/build-docbook-catalog |
21 |
@@ -161,7 +161,7 @@ create_catalogs() { |
22 |
local adds |
23 |
|
24 |
# Initialize catalogs if they don't exist or are corrupt. |
25 |
- if ! xmllint "${ROOT}${ROOTCATALOG}" >&/dev/null ; then |
26 |
+ if [[ -r ${ROOT}${ROOTCATALOG} ]] && ! xmllint "${ROOT}${ROOTCATALOG}" >&/dev/null ; then |
27 |
rm -f "${ROOTCATALOG}" |
28 |
echo "Deleting corrupt ${ROOT}${ROOTCATALOG} and starting over" |
29 |
fi |
30 |
@@ -179,7 +179,7 @@ create_catalogs() { |
31 |
fi |
32 |
|
33 |
# Initialize catalogs if they don't exist or are corrupt. |
34 |
- if ! xmllint "${ROOT}${CATALOG}" >&/dev/null ; then |
35 |
+ if [[ -r ${ROOT}${CATALOG} ]] && ! xmllint "${ROOT}${CATALOG}" >&/dev/null ; then |
36 |
rm -f "${ROOT}${CATALOG}" |
37 |
echo "Deleting corrupt ${CATALOG} and starting over" |
38 |
fi |