Gentoo Archives: gentoo-commits

From: "Ulrich Müller" <ulm@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] proj/devmanual:master commit in: bin/
Date: Wed, 29 Jan 2020 18:00:53
Message-Id: 1580320790.d71cc8025960c1676a42ecc7f5efdc8252c8923b.ulm@gentoo
1 commit: d71cc8025960c1676a42ecc7f5efdc8252c8923b
2 Author: Ulrich Müller <ulm <AT> gentoo <DOT> org>
3 AuthorDate: Wed Jan 29 17:59:50 2020 +0000
4 Commit: Ulrich Müller <ulm <AT> gentoo <DOT> org>
5 CommitDate: Wed Jan 29 17:59:50 2020 +0000
6 URL: https://gitweb.gentoo.org/proj/devmanual.git/commit/?id=d71cc802
7
8 bin/gen-eclass-html.sh: Prevent removal of dirs.
9
10 Updating a file doesn't change the modification time of its directory,
11 therefore scanning for "old directories" produced false positives.
12 Work around the problem by touching the directory.
13
14 Signed-off-by: Ulrich Müller <ulm <AT> gentoo.org>
15
16 bin/gen-eclass-html.sh | 2 ++
17 1 file changed, 2 insertions(+)
18
19 diff --git a/bin/gen-eclass-html.sh b/bin/gen-eclass-html.sh
20 index fc37f03..efa7f12 100755
21 --- a/bin/gen-eclass-html.sh
22 +++ b/bin/gen-eclass-html.sh
23 @@ -102,6 +102,8 @@ for i in $(/usr/bin/qlist eclass-manpages) /usr/share/man/man5/ebuild.5*; do
24 FINAL="${DIRNAME}/index.html"
25 DECOMPRESS=$(guesscompress "${i}")
26 [[ -d ${DIRNAME} ]] || mkdir -p ${DIRNAME}
27 + # update the dir's mtime to prevent its removal below
28 + touch ${DIRNAME}
29 # rebuild the man page each time
30 echo -n "${HEADER//@TITLE@/${BASENAME}}" > "${FINAL}"
31 # generate html pages and fix hyperlinks for eclass and ebuild man pages