From d71cc8025960c1676a42ecc7f5efdc8252c8923b Mon Sep 17 00:00:00 2001 From: Ulrich Müller Date: Wed, 29 Jan 2020 18:59:50 +0100 Subject: bin/gen-eclass-html.sh: Prevent removal of dirs. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Updating a file doesn't change the modification time of its directory, therefore scanning for "old directories" produced false positives. Work around the problem by touching the directory. Signed-off-by: Ulrich Müller --- bin/gen-eclass-html.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/bin/gen-eclass-html.sh b/bin/gen-eclass-html.sh index fc37f03..efa7f12 100755 --- a/bin/gen-eclass-html.sh +++ b/bin/gen-eclass-html.sh @@ -102,6 +102,8 @@ for i in $(/usr/bin/qlist eclass-manpages) /usr/share/man/man5/ebuild.5*; do FINAL="${DIRNAME}/index.html" DECOMPRESS=$(guesscompress "${i}") [[ -d ${DIRNAME} ]] || mkdir -p ${DIRNAME} + # update the dir's mtime to prevent its removal below + touch ${DIRNAME} # rebuild the man page each time echo -n "${HEADER//@TITLE@/${BASENAME}}" > "${FINAL}" # generate html pages and fix hyperlinks for eclass and ebuild man pages -- cgit v1.2.3-65-gdbad