aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorUlrich Müller <ulm@gentoo.org>2020-01-29 18:59:50 +0100
committerUlrich Müller <ulm@gentoo.org>2020-01-29 18:59:50 +0100
commitd71cc8025960c1676a42ecc7f5efdc8252c8923b (patch)
tree3f58cf198b698cd344bcc0cdefa52dd1978d72af
parentgeneral-concepts/dependencies: Describe circular deps in detail (diff)
downloaddevmanual-d71cc8025960c1676a42ecc7f5efdc8252c8923b.tar.gz
devmanual-d71cc8025960c1676a42ecc7f5efdc8252c8923b.tar.bz2
devmanual-d71cc8025960c1676a42ecc7f5efdc8252c8923b.zip
bin/gen-eclass-html.sh: Prevent removal of dirs.
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 <ulm@gentoo.org>
-rwxr-xr-xbin/gen-eclass-html.sh2
1 files changed, 2 insertions, 0 deletions
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