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
8 helpers_die "${0##*/}: at least one argument needed"
12 [[ " ${FEATURES} " == *" force-prefix "* ]] || \
13 case "$EAPI" in 0|1|2) ED=${D} ;; esac
15 dir="${ED}usr/share/doc/${PF}/${_E_DOCDESTTREE_}"
16 if [ ! -d "${dir}" ] ; then
22 if [ -d "${x}" ] ; then
23 eqawarn "QA Notice: dodoc argument '${x}' is a directory"
24 elif [ -s "${x}" ] ; then
25 install -m0644 "${x}" "${dir}" || { ((ret|=1)); continue; }
26 ecompress --queue "${dir}/${x##*/}"
27 elif [ ! -e "${x}" ] ; then
28 echo "!!! ${0##*/}: $x does not exist" 1>&2
33 [[ $ret -ne 0 ]] && helpers_die "${0##*/} failed"