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 if [[ $# -lt 1 ]] ; then
8 helpers_die "${0##*/}: at least one argument needed"
12 [[ " ${USE} " == *" prefix "* ]] || \
13 case "$EAPI" in 0|1|2) ED=${D} ;; esac
15 if [[ ! -d ${ED}${DESTTREE}/bin ]] ; then
16 install -d "${ED}${DESTTREE}/bin" || { helpers_die "${0##*/}: failed to install ${ED}${DESTTREE}/bin"; exit 2; }
22 if [[ -e ${x} ]] ; then
23 install -m0755 -o ${PORTAGE_INST_UID:-0} -g ${PORTAGE_INST_GID:-0} "${x}" "${ED}${DESTTREE}/bin"
25 echo "!!! ${0##*/}: $x does not exist" 1>&2
31 [[ $ret -ne 0 ]] && helpers_die "${0##*/} failed"