+------------------------------------------------------------------------+
| 6371 | For bug #173808, add back the old heuristics to make sure |
| zmedico | that we don't just blindly compress the contents of any |
| | directory named "man". |
+------------------------------------------------------------------------+
svn path=/main/branches/prefix/; revision=6378
exit 0
fi
-exec ecompressdir "${mandir#${ED}}"
+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#${ED}}"
+
+exit 0