From: Fabian Groffen Date: Thu, 12 Apr 2007 10:42:57 +0000 (-0000) Subject: Merged from trunk 6370:6371 X-Git-Url: http://git.tremily.us/gitweb.cgi?a=commitdiff_plain;h=98244018adc3e8fb3aa7765294b5d9f7760a71fb;p=portage.git Merged from trunk 6370:6371 +------------------------------------------------------------------------+ | 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 --- diff --git a/bin/prepman b/bin/prepman index 2f694ec26..b7fbca937 100755 --- a/bin/prepman +++ b/bin/prepman @@ -14,4 +14,15 @@ if [[ ! -d ${mandir} ]] ; then 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