summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2007-04-12 04:14:36 +0000
committerZac Medico <zmedico@gentoo.org>2007-04-12 04:14:36 +0000
commitb5343aac9dcb4b8d9a643eaa8fec610b92fa3538 (patch)
tree0201b3f425bd10baf8d2c8e51d9b165d0e90ffe4 /bin/prepman
parentFor bug #173808, compress ${mandir} all in one go instead of doing subdirecto... (diff)
downloadportage-multirepo-b5343aac9dcb4b8d9a643eaa8fec610b92fa3538.tar.gz
portage-multirepo-b5343aac9dcb4b8d9a643eaa8fec610b92fa3538.tar.bz2
portage-multirepo-b5343aac9dcb4b8d9a643eaa8fec610b92fa3538.zip
For bug #173808, add back the old heuristics to make sure that we don't just blindly compress the contents of any directory named "man".
svn path=/main/trunk/; revision=6371
Diffstat (limited to 'bin/prepman')
-rwxr-xr-xbin/prepman13
1 files changed, 12 insertions, 1 deletions
diff --git a/bin/prepman b/bin/prepman
index c17faa1b..c2a245f4 100755
--- a/bin/prepman
+++ b/bin/prepman
@@ -16,4 +16,15 @@ if [[ ! -d ${mandir} ]] ; then
exit 0
fi
-exec ecompressdir "${mandir#${D}}"
+shopt -s nullglob
+
+really_is_mandir=0
+
+# use some heuristics to test if this is a real mandir
+for subdir in "${mandir}"/man* "${mandir}"/*/man* ; do
+ [[ -d ${subdir} ]] && really_is_mandir=1 && break
+done
+
+[[ ${really_is_mandir} == 1 ]] && exec ecompressdir "${mandir#${D}}"
+
+exit 0