From 5cde29367c06f78dbcc56eefe9d88294da1655c2 Mon Sep 17 00:00:00 2001 From: Marvin Schmidt Date: Thu, 20 Jan 2022 10:06:13 +0100 Subject: [PATCH] Honour ROOT when deleting existing catalog The condition checked for `${ROOT}${ROOTCATALOG}`, but then deleted the catalog file outside of ROOT (`${ROOTCATALOG}`). Fix this by adding the missing `${ROOT}` --- build-docbook-catalog | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 -- 2.34.1