summaryrefslogtreecommitdiffstats
path: root/bin/ebuild-helpers/fperms
blob: 668e905a2cf5bb6a1689add4e973081a5f6d0a31 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#!/bin/bash
# Copyright 1999-2011 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2

source "${PORTAGE_BIN_PATH:-/usr/lib/portage/bin}"/isolated-functions.sh

[[ " ${FEATURES} " == *" force-prefix "* ]] || \
	case "$EAPI" in 0|1|2) ED=${D} ;; esac

# we can't prefix all arguments because
# chmod takes random options
slash="/"
chmod "${@/#${slash}/${ED}${slash}}"
ret=$?
[[ $ret -ne 0 ]] && __helpers_die "${0##*/} failed"
exit $ret