Support PORTAGE_REPOSITORIES environmental variable, which overrides
[portage.git] / bin / ebuild-helpers / fowners
1 #!/bin/bash
2 # Copyright 1999-2012 Gentoo Foundation
3 # Distributed under the terms of the GNU General Public License v2
4
5 source "${PORTAGE_BIN_PATH:-/usr/lib/portage/bin}"/isolated-functions.sh
6
7 if ! ___eapi_has_prefix_variables; then
8         EPREFIX= ED=${D}
9 fi
10
11 # we can't prefix all arguments because
12 # chown takes random options
13 slash="/"
14 chown "${@/#${slash}/${ED}${slash}}"
15 ret=$?
16
17 [[ $ret -ne 0 ]] && __helpers_die "${0##*/} failed"
18 exit $ret