For bug #173808, add back the old heuristics to make sure that we don't just blindly...
authorZac Medico <zmedico@gentoo.org>
Thu, 12 Apr 2007 04:14:36 +0000 (04:14 -0000)
committerZac Medico <zmedico@gentoo.org>
Thu, 12 Apr 2007 04:14:36 +0000 (04:14 -0000)
svn path=/main/trunk/; revision=6371

bin/prepman

index c17faa1b87727bceb5bf768351d1eb63d7e22758..c2a245f40c7b6d85a39d4e9b0ae0d6e835c52bf7 100755 (executable)
@@ -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