From ab46499322311c1faa710c63d0a5339e49a9061a Mon Sep 17 00:00:00 2001 From: Arfrever Frehtes Taifersar Arahesis Date: Wed, 26 Sep 2012 22:31:20 +0200 Subject: Add eapi.sh with ___eapi_*() functions and use these functions in other files. --- bin/ebuild-helpers/dohard | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) (limited to 'bin/ebuild-helpers/dohard') diff --git a/bin/ebuild-helpers/dohard b/bin/ebuild-helpers/dohard index 6ae93d240..e0a44faf1 100755 --- a/bin/ebuild-helpers/dohard +++ b/bin/ebuild-helpers/dohard @@ -2,22 +2,21 @@ # Copyright 1999-2012 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -case "${EAPI}" in - 0|1|2|3) - ;; - *) - die "'${0##*/}' has been banned for EAPI '$EAPI'" - exit 1 - ;; -esac +source "${PORTAGE_BIN_PATH:-/usr/lib/portage/bin}"/isolated-functions.sh + +if ! ___eapi_has_dohard; then + die "'${0##*/}' has been banned for EAPI '$EAPI'" + exit 1 +fi if [[ $# -ne 2 ]] ; then echo "$0: two arguments needed" 1>&2 exit 1 fi -[[ " ${FEATURES} " == *" force-prefix "* ]] || \ - case "$EAPI" in 0|1|2) ED=${D} ;; esac +if ! ___eapi_has_prefix_variables; then + ED=${D} +fi destdir=${2%/*} [[ ! -d ${ED}${destdir} ]] && dodir "${destdir}" -- cgit v1.2.3-1-g7c22