blob: 66e2604b025c0a51d9d98312e550c0f1d51da9f3 [file] [log] [blame]
#!/bin/bash
# Copyright 1999-2018 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
source "${PORTAGE_BIN_PATH}"/isolated-functions.sh || exit 1
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
if ! ___eapi_has_prefix_variables; then
ED=${D}
fi
destdir=${2%/*}
[[ ! -d ${ED%/}/${destdir#/} ]] && dodir "${destdir}"
exec ln -f "${ED%/}/${1#/}" "${ED%/}/${2#/}"