diff options
author | Tomas Chvatal <scarabeus@gentoo.org> | 2009-11-06 15:01:29 +0000 |
---|---|---|
committer | Tomas Chvatal <scarabeus@gentoo.org> | 2009-11-06 15:01:29 +0000 |
commit | 6ba3a63ddc90742a31e002d82a0094740aced8ce (patch) | |
tree | d7b573f937abeaa7be058c75ca1a899a2be048fb | |
parent | Update eselect-opengl to version 1.0.9 (diff) | |
download | eselect-6ba3a63ddc90742a31e002d82a0094740aced8ce.tar.gz eselect-6ba3a63ddc90742a31e002d82a0094740aced8ce.tar.bz2 eselect-6ba3a63ddc90742a31e002d82a0094740aced8ce.zip |
Use internal relative-path function instead my own relpath function.
svn path=/trunk/extern/; revision=703
-rw-r--r-- | modules/opengl.eselect | 22 |
1 files changed, 2 insertions, 20 deletions
diff --git a/modules/opengl.eselect b/modules/opengl.eselect index 047a9cc..481791b 100644 --- a/modules/opengl.eselect +++ b/modules/opengl.eselect @@ -24,24 +24,6 @@ PREFIX="${ROOT}/usr" DST_PREFIX="${ROOT}/usr" USE_PROFILE_HEADERS="no" -# 1: source -# 2: target dir -relpath() { - local ret - local src=$1 - local dst=$2 - local curpathfinal="." - - while [ "${src#${dst}}" == "${src}" ]; do - curpathfinal=${curpathfinal}/.. - curpath="./.." - dst=$(readlink -f ${dst}/${curpath}) - done - ret="${curpathfinal}${src#${dst}}" - - echo ${ret} -} - get_current_implementation() { local ret local ldpath=$(load_config "${ENV_FILE}" LDPATH) @@ -77,7 +59,7 @@ get_implementations() { upgrade_file() { local file=$1 local workdir=$2 - linkfile=$(relpath ${file} ${workdir}) + linkfile=$(relative_name ${file} ${workdir}) [[ -f ${linkfile} ]] || continue if [[ -f $(basename "${file}") || ( -L $(basename "${file}") && ! -e $(basename "${file}") ) ]] ; then @@ -105,7 +87,7 @@ setup_lib_symlinks() { # loader knows to look in the profile dir, and the # linked just needs the .so for file in ${profile_libdir}/libGL{,core}.{so,dylib,a}; do - $(upgrade_file ${file} ${target}) + upgrade_file ${file} ${target} done popd &> /dev/null } |