2 # Copyright 1999-2011 Gentoo Foundation
3 # Distributed under the terms of the GNU General Public License v2
5 source "${PORTAGE_BIN_PATH:-/usr/lib/portage/bin}"/isolated-functions.sh
7 [[ " ${USE} " == *" prefix "* ]] || \
8 case "$EAPI" in 0|1|2) ED=${D} ;; esac
11 infodir="/usr/share/info"
13 if [[ -d ${ED}$1/share/info ]] ; then
14 infodir="$1/share/info"
20 if [[ ! -d ${ED}${infodir} ]] ; then
22 vecho "${0##*/}: '${infodir}' does not exist!"
29 find "${ED}${infodir}" -type d -print0 | while read -r -d $'\0' x ; do
30 for f in "${x}"/.keepinfodir*; do
31 [[ -e ${f} ]] && continue 2
33 rm -f "${x}"/dir{,.info}{,.gz,.bz2}
36 has "${EAPI}" 0 1 2 3 || exit 0
37 exec ecompressdir --queue "${infodir}"