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 [[ $# -ne 2 ]] ; then
8 helpers_die "${0##*/}: two arguments needed"
12 case "$EAPI" in 0|1|2) ED=${D} ;; esac
14 if [[ ${2} == */ ]] || \
15 [[ -d ${ED}${2} && ! -L ${ED}${2} ]] ; then
16 # implicit basename not allowed by PMS (bug #379899)
17 eqawarn "QA Notice: dosym target omits basename: '${2}'"
21 [[ ! -d ${ED}${destdir} ]] && dodir "${destdir}"
23 ln -snf "$1" "${ED}$2"
25 [[ $ret -ne 0 ]] && helpers_die "${0##*/} failed"