summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarvin Schmidt <marv@exherbo.org>2022-01-20 10:06:13 +0100
committerSam James <sam@gentoo.org>2022-01-27 20:28:27 +0000
commit273d518b5512ecdee5c7e5c215f9230de52c3879 (patch)
tree34931f310907831dc3599f06eb562cd8234431fe
parentPlace the locks in a subdirectory of /etc/xml (diff)
downloadbuild-docbook-catalog-273d518b5512ecdee5c7e5c215f9230de52c3879.tar.gz
build-docbook-catalog-273d518b5512ecdee5c7e5c215f9230de52c3879.tar.bz2
build-docbook-catalog-273d518b5512ecdee5c7e5c215f9230de52c3879.zip
Honour ROOT when deleting existing catalog2.3
The condition checked for `${ROOT}${ROOTCATALOG}`, but then deleted the catalog file outside of ROOT (`${ROOTCATALOG}`). Fix this by adding the missing `${ROOT}` Signed-off-by: Sam James <sam@gentoo.org>
-rwxr-xr-xbuild-docbook-catalog2
1 files changed, 1 insertions, 1 deletions
diff --git a/build-docbook-catalog b/build-docbook-catalog
index 1b4ccf3..cee9af0 100755
--- a/build-docbook-catalog
+++ b/build-docbook-catalog
@@ -173,7 +173,7 @@ create_catalogs() {
# Initialize catalogs if they don't exist or are corrupt.
if [[ -r ${ROOT}${ROOTCATALOG} ]] && ! xmllint "${ROOT}${ROOTCATALOG}" >&/dev/null ; then
- rm -f "${ROOTCATALOG}"
+ rm -f "${ROOT}${ROOTCATALOG}"
echo "Deleting corrupt ${ROOT}${ROOTCATALOG} and starting over"
fi
if [[ ! -r ${ROOT}${ROOTCATALOG} ]] ; then