1 |
commit: 273d518b5512ecdee5c7e5c215f9230de52c3879 |
2 |
Author: Marvin Schmidt <marv <AT> exherbo <DOT> org> |
3 |
AuthorDate: Thu Jan 20 09:06:13 2022 +0000 |
4 |
Commit: Sam James <sam <AT> gentoo <DOT> org> |
5 |
CommitDate: Thu Jan 27 20:28:27 2022 +0000 |
6 |
URL: https://gitweb.gentoo.org/proj/build-docbook-catalog.git/commit/?id=273d518b |
7 |
|
8 |
Honour ROOT when deleting existing catalog |
9 |
|
10 |
The condition checked for `${ROOT}${ROOTCATALOG}`, but then deleted |
11 |
the catalog file outside of ROOT (`${ROOTCATALOG}`). Fix this by adding |
12 |
the missing `${ROOT}` |
13 |
|
14 |
Signed-off-by: Sam James <sam <AT> gentoo.org> |
15 |
|
16 |
build-docbook-catalog | 2 +- |
17 |
1 file changed, 1 insertion(+), 1 deletion(-) |
18 |
|
19 |
diff --git a/build-docbook-catalog b/build-docbook-catalog |
20 |
index 1b4ccf3..cee9af0 100755 |
21 |
--- a/build-docbook-catalog |
22 |
+++ b/build-docbook-catalog |
23 |
@@ -173,7 +173,7 @@ create_catalogs() { |
24 |
|
25 |
# Initialize catalogs if they don't exist or are corrupt. |
26 |
if [[ -r ${ROOT}${ROOTCATALOG} ]] && ! xmllint "${ROOT}${ROOTCATALOG}" >&/dev/null ; then |
27 |
- rm -f "${ROOTCATALOG}" |
28 |
+ rm -f "${ROOT}${ROOTCATALOG}" |
29 |
echo "Deleting corrupt ${ROOT}${ROOTCATALOG} and starting over" |
30 |
fi |
31 |
if [[ ! -r ${ROOT}${ROOTCATALOG} ]] ; then |